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

Remove deps #68

Merged
merged 2 commits into from
Nov 30, 2016
Merged

Remove deps #68

merged 2 commits into from
Nov 30, 2016

Conversation

krancour
Copy link
Contributor

Closes #66

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 30, 2016
&& mkdir -p /opt/services \
&& tar -C /opt/services -x -z -f /tmp/helm-${HELM_VERSION}-linux-amd64.tar.gz \
--strip-components=1 linux-amd64/helm \
# cleanup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible that this line may terminate the bash pipeline? or will Docker do the right thing and drop this line and execute the pipeline in its entirety?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If any one piece of that fails, the whole RUN directive fails and the Docker build fails in turn, which is what we'd want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he means the comment - yes it will terminate the RUN - this was recently "fixed" in Docker to act this way. We should remove the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I'm sorry. I didn't understand that he meant the comment.

We (Deis) have used comments like this without any ill-effect.

@duglin can you elaborate on the "fix"? Are you saying that this was fine in older versions of Docker but not in a newer or upcoming version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[kent@mbp k8s]$ docker -v
Docker version 1.12.2, build bb80604

The output shows everything ran as expected:

[kent@mbp k8s]$ make docker
Building k8s-broker for linux
Building Docker
Sending build context to Docker daemon 68.63 MB
Step 1 : FROM debian
 ---> 73e72bf822ca
Step 2 : ENV HELM_VERSION v2.0.0-rc.2
 ---> Using cache
 ---> f1e5608a0de5
Step 3 : RUN export DEBIAN_FRONTEND=noninteractive  && apt-get update  && apt-get install -y     ca-certificates     curl  && curl -Ls -o /tmp/helm-${HELM_VERSION}-linux-amd64.tar.gz     http://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz  && mkdir -p /opt/services  && tar -C /opt/services -x -z -f /tmp/helm-${HELM_VERSION}-linux-amd64.tar.gz     --strip-components=1 linux-amd64/helm  && rm -f /tmp/helm-${HELM_VERSION}-linux-amd64.tar.gz  && apt-get purge -y --auto-remove curl  && apt-get clean  && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 5938208989cc
Step 4 : ENTRYPOINT /opt/services/k8s-broker --helm_binary /opt/services/helm
 ---> Using cache
 ---> 6751815d501c
Successfully built 6751815d501c

Also note that if the comment were problematic, the Dockerfile would fail to compile because Docker would expect a directive on line 30 and would find some bash nonsense instead.

So unless this behavior has really, truly changed in a recent version of Docker, there is no problem here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in the latest docker, this Dockerfile will fail:

FROM ubuntu
RUN echo hello \
# comment
world

because "WORLD" is an unknown command. Now, it gets interesting if the line after the comment just happened to start with a Dockerfile cmd/word :-) but that's a different issue.

But the net is that we should remove the # cleanup line because eventually when a new Docker is released it'll break us.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duglin thanks for your help clarifying! the code review tool I use most of the time pinpoints location of feedback exactly so I forget to be as specific on GitHub. Doug was exactly right about what I was referring to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duglin thanks for the info. I'll remove the comment in question.

@krancour
Copy link
Contributor Author

The controversial # cleanup comment has been removed the contrib/broker/k8s/Dockerfile. This is read for re-review.

@martinmaly
Copy link
Contributor

LGTM

2 similar comments
@duglin
Copy link
Contributor

duglin commented Nov 30, 2016

LGTM

@arschles
Copy link
Contributor

LGTM

@arschles
Copy link
Contributor

waiting for CI, then I'll merge

@krancour krancour merged commit 777ebee into kubernetes-retired:master Nov 30, 2016
@krancour krancour deleted the remove-deps branch January 11, 2017 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants