This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Docker cache usage for flux and helm-operator docker images.
- Loading branch information
Your Name
committed
Jul 3, 2018
1 parent
9d5eb91
commit c02113a
Showing
2 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
FROM alpine:3.6 | ||
|
||
WORKDIR /home/flux | ||
|
||
RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' | ||
|
||
# Add git hosts to known hosts file so when git ssh's using the deploy | ||
# key we don't get an unknown host warning. | ||
RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && \ | ||
ssh-keyscan github.com gitlab.com bitbucket.org >> ~/.ssh/known_hosts && \ | ||
chmod 600 ~/.ssh/known_hosts | ||
# Add default SSH config, which points at the private key we'll mount | ||
COPY ./ssh_config /root/.ssh/config | ||
RUN chmod 600 /root/.ssh/config | ||
|
||
COPY ./kubectl /usr/local/bin/ | ||
|
||
# These are pretty static | ||
LABEL maintainer="Weaveworks <[email protected]>" \ | ||
org.opencontainers.image.title="flux" \ | ||
|
@@ -14,22 +29,12 @@ LABEL maintainer="Weaveworks <[email protected]>" \ | |
org.label-schema.vcs-url="[email protected]:weaveworks/flux" \ | ||
org.label-schema.vendor="Weaveworks" | ||
|
||
WORKDIR /home/flux | ||
ENTRYPOINT [ "/sbin/tini", "--", "fluxd" ] | ||
RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' | ||
|
||
# Get the kubeyaml binary (files) and put them on the path | ||
COPY --from=quay.io/squaremo/kubeyaml:0.3.2 /usr/lib/kubeyaml /usr/lib/kubeyaml/ | ||
ENV PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/kubeyaml | ||
|
||
# Add git hosts to known hosts file so we can use | ||
# StrickHostKeyChecking with git+ssh | ||
RUN ssh-keyscan github.com gitlab.com bitbucket.org >> /etc/ssh/ssh_known_hosts | ||
# Add default SSH config, which points at the private key we'll mount | ||
COPY ./ssh_config /etc/ssh/ssh_config | ||
|
||
COPY ./kubeconfig /root/.kube/config | ||
COPY ./kubectl /usr/local/bin/ | ||
COPY ./fluxd /usr/local/bin/ | ||
|
||
ARG BUILD_DATE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
FROM alpine:3.6 | ||
|
||
WORKDIR /home/flux | ||
|
||
RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' | ||
|
||
# Add git hosts to known hosts file so when git ssh's using the deploy | ||
# key we don't get an unknown host warning. | ||
RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && \ | ||
ssh-keyscan github.com gitlab.com bitbucket.org >> ~/.ssh/known_hosts && \ | ||
chmod 600 ~/.ssh/known_hosts | ||
# Add default SSH config, which points at the private key we'll mount | ||
COPY ./ssh_config /root/.ssh/config | ||
RUN chmod 600 /root/.ssh/config | ||
|
||
COPY ./kubectl /usr/local/bin/ | ||
|
||
# These are pretty static | ||
LABEL maintainer="Weaveworks <[email protected]>" \ | ||
org.opencontainers.image.title="flux-helm-operator" \ | ||
|
@@ -14,18 +29,8 @@ LABEL maintainer="Weaveworks <[email protected]>" \ | |
org.label-schema.vcs-url="[email protected]:weaveworks/flux" \ | ||
org.label-schema.vendor="Weaveworks" | ||
|
||
WORKDIR /home/flux | ||
ENTRYPOINT [ "/sbin/tini", "--", "helm-operator" ] | ||
|
||
RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' | ||
|
||
# Add git hosts to known hosts file so we can use | ||
# StrickHostKeyChecking with git+ssh | ||
RUN ssh-keyscan github.com gitlab.com bitbucket.org >> /etc/ssh/ssh_known_hosts | ||
# Add default SSH config, which points at the private key we'll mount | ||
COPY ./ssh_config /etc/ssh/ssh_config | ||
|
||
COPY ./kubectl /usr/local/bin/ | ||
COPY ./helm-operator /usr/local/bin/ | ||
|
||
ARG BUILD_DATE | ||
|