Skip to content

Commit

Permalink
Merge pull request #237 from Far-Beyond-Dev/tristanpoland-patch-9
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
tristanpoland authored Jan 21, 2025
2 parents 8634e03 + 0ce9dbe commit 476d8c4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7

ARG RUST_VERSION=1.82.0
ARG APP_NAME=horizon
ARG APP_NAME=horizon-server

################################################################################
# Create a stage for building the application.
Expand All @@ -27,16 +27,8 @@ RUN apk add --no-cache clang lld musl-dev git
# Leverage a bind mount to the src directory to avoid having to copy the
# source code into the container. Once built, copy the executable to an
# output directory before the cache mounted /app/target is unmounted.
RUN --mount=type=bind,source=src,target=src \
--mount=type=bind,source=plugin-api,target=plugin-api,readonly=false \
--mount=type=bind,source=plugins,target=plugins \
--mount=type=bind,source=config.yml,target=config.yml \
--mount=type=bind,source=Cargo.toml,target=Cargo.toml \
--mount=type=bind,source=Cargo.lock,target=Cargo.lock \
--mount=type=cache,target=/app/target/ \
--mount=type=cache,target=/usr/local/cargo/git/db \
--mount=type=cache,target=/usr/local/cargo/registry/ \
cargo build --locked --release && \
COPY . .
RUN cargo build --locked --release && \
cp ./target/release/$APP_NAME /bin/server

################################################################################
Expand Down

0 comments on commit 476d8c4

Please sign in to comment.