Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use multi-stage docker builds and an autobuild repo #43

Open
olix0r opened this issue Apr 20, 2017 · 2 comments
Open

use multi-stage docker builds and an autobuild repo #43

olix0r opened this issue Apr 20, 2017 · 2 comments

Comments

@olix0r
Copy link
Member

olix0r commented Apr 20, 2017

I think we can replace our dockerize script with a multi-stage build. This will enable us to use an autobuild dockerhub repo.

@olix0r
Copy link
Member Author

olix0r commented Apr 21, 2017

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"]

@olix0r
Copy link
Member Author

olix0r commented Apr 21, 2017

Specifically, we need Docker v17.05.0-ce, which is currently a release candidate. Docker for Mac currently uses 17.03.1-ce.

olix0r added a commit that referenced this issue Apr 21, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant