-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn slim-release into a full release (#1116)
* Turn slim-release into a full release * Make sure image has proper rust toolchain to build projects * Update instructions * Unify Dockerfiles
- Loading branch information
Showing
4 changed files
with
23 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
# Basic Dockerfile to build and run the server in a Linux environment. | ||
# The official Rust base Docker image uses Debian. | ||
FROM rust:1.70.0 | ||
WORKDIR /app | ||
# Instructions (replace "/path/to/your/project" with path to your project): | ||
# 1. Build the image: docker build -f Dockerfile -t ambient . | ||
# 2. Run the image: docker run -p 8999:8999/tcp -p 9000:9000/udp -v /path/to/your/project:/app/project ambient | ||
# 3. Run `ambient join` locally to connect to the server | ||
|
||
FROM rust:1.73-bullseye AS builder | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
zip build-essential cmake pkg-config \ | ||
libfontconfig1-dev clang libasound2-dev ninja-build \ | ||
libxcb-xfixes0-dev mesa-vulkan-drivers | ||
libxcb-xfixes0-dev mesa-vulkan-drivers | ||
ADD . /build | ||
WORKDIR /build | ||
RUN cargo build --release --no-default-features --features production | ||
RUN strip target/release/ambient | ||
|
||
FROM rust:1.73-bullseye | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
ca-certificates libasound2 | ||
RUN rustup toolchain install stable | ||
RUN rustup target add --toolchain stable wasm32-wasi | ||
WORKDIR /app | ||
COPY --from=builder /build/target/release/ambient ./ | ||
CMD [ "./ambient", "serve", "--public-host", "localhost", "--release", "project" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.