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

improved use of docker_tag #27

Closed
wants to merge 1 commit into from
Closed

Conversation

ytjohn
Copy link
Contributor

@ytjohn ytjohn commented May 2, 2020

This change allows the components to use the actual base image you build during a make build. Resolves #26.

Also, added a "Starting build" line to the Makefile to make it easier to see determine which component is currently being built.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Looks like just var rename would work for the child Dockerfiles?

@@ -1,5 +1,6 @@
ARG ST2_VERSION
FROM stackstorm/st2:${ST2_VERSION}
ARG DOCKER_TAG
FROM stackstorm/st2:${DOCKER_TAG}
Copy link
Member

Choose a reason for hiding this comment

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

If we add new DOCKER_TAG into child Dockerfiles, looks like we don't need ST2_VERSION in them anymore and that would be just a var rename. Am I missing something?

-ARG ST2_VERSION
+ARG DOCKER_TAG
-FROM stackstorm/st2:${ST2_VERSION}
+FROM stackstorm/st2:${DOCKER_TAG}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

st2web and st2chatops (and base, though that's out of scope) rely on ST2_VERSION in their build for running scripts and packages. The others could just be a variable rename, but it would require some additional logic in the Makefile.

RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \
& apt-get install -y st2web=${ST2_VERSION}-* \
&& apt-get install -y st2chatops=${ST2_VERSION}-* \

Copy link
Member

Choose a reason for hiding this comment

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

I see now, thanks!

So let's then rename var that won't require any additional Makefile changes?
st2 services like st2actionrunner, st2sensorcontainer... and so on.

So we won't have unused ST2_VERSION var in the Dockerfiles.

@arm4b arm4b added Docker enhancement New feature or request labels May 2, 2020
@ytjohn
Copy link
Contributor Author

ytjohn commented May 6, 2020

I'll revisit this later this week. I think it'll be a simple update, and it shouldn't hold up any other PRs for 3.3dev.

@ytjohn ytjohn closed this May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOCKER_TAG not used by Dockerfiles
2 participants