Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Use a multi-stage Dockerfile
Browse files Browse the repository at this point in the history
Previously, we needed a script to build a minimal docker image without build
dependency.

Docker's new multi-stage builds allow us to specify all of this logic in the
Dockerfile, eliminating the need for the _dockerize_ script.

Fixes #43
  • Loading branch information
olix0r committed Apr 21, 2017
1 parent ab7aab2 commit 08db609
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM debian:jessie-slim

COPY ./target/x86_64-unknown-linux-gnu/release/linkerd-tcp /usr/local/bin/
FROM linkerd/rustup-nightly:v1
RUN rustup update nightly
RUN mkdir -p /linkerd-tcp
COPY . /linkerd-tcp
WORKDIR /linkerd-tcp
RUN cargo build --release

FROM debian:jessie-slim
COPY --from=0 /linkerd-tcp/target/x86_64-unknown-linux-gnu/release/linkerd-tcp /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/linkerd-tcp"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ debugging, set `RUST_LOG=trace`.
To build the linkerd/linkerd-tcp docker image, run:

```bash
./dockerize latest
docker build -t linkerd/linkerd-tcp:latest .
```

Replace `latest` with the version that you want to build.
Expand Down
13 changes: 0 additions & 13 deletions dockerize

This file was deleted.

0 comments on commit 08db609

Please sign in to comment.