Skip to content

Commit f11861c

Browse files
committed
chore: Simplify Dockerfile
1 parent 3386be9 commit f11861c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
FROM ekidd/rust-musl-builder:nightly AS builder
33

44
# Add the source code.
5-
ADD . ./
6-
7-
# Fix permissions on source code.
8-
RUN sudo chown -R rust:rust /home/rust
5+
COPY --chown=rust:rust . ./
96

107
# Delete and re-install rustup in order to get the latest verison of Rust nightly.
118
# This is necessary due to a bug in Rust: https://github.com/rust-lang-nursery/rustup.rs/issues/1239
@@ -14,17 +11,11 @@ RUN curl https://sh.rustup.rs -sSf | \
1411
sh -s -- -y && \
1512
rustup target add x86_64-unknown-linux-musl
1613

17-
WORKDIR ~
18-
1914
# Build the `tdb-server` application.
20-
RUN PKG_CONFIG_PATH=/usr/local/musl/lib/pkgconfig \
21-
LDFLAGS=-L/usr/local/musl/lib \
22-
cargo build --bin tdb-server --target x86_64-unknown-linux-musl --release
15+
RUN cargo build --bin tdb-server --release
2316

2417
# Build the `tdb` application.
25-
RUN PKG_CONFIG_PATH=/usr/local/musl/lib/pkgconfig \
26-
LDFLAGS=-L/usr/local/musl/lib \
27-
cargo build --bin tdb --target x86_64-unknown-linux-musl --release
18+
RUN cargo build --bin tdb --release
2819

2920
# Now, we need to build the _real_ Docker container, copying in `tdb-server`
3021
FROM alpine:latest

0 commit comments

Comments
 (0)