linkerd-tcp
linkerd-tcp copied to clipboard
use multi-stage docker builds and an autobuild repo
I think we can replace our dockerize script with a multi-stage build. This will enable us to use an autobuild dockerhub repo.
Docker for Mac doesn't yet support this (on stable, at least). Once it does, our Dockerfile should probably look something like:
FROM linkerd/rustup-nightly:v1 as nightly-build
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=nightly-build /linkerd-tcp/target/x86_64-unknown-linux-gnu/release/linkerd-tcp /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/linkerd-tcp"]
Specifically, we need Docker v17.05.0-ce, which is currently a release candidate. Docker for Mac currently uses 17.03.1-ce.