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

Image tags matching the upstream project #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Image tags matching the upstream project #8

wants to merge 2 commits into from

Conversation

Bekt
Copy link
Owner

@Bekt Bekt commented Sep 4, 2018

Solves #7

This PR introduces building the image from a different upstream images (FROM). Since there's not a good way to subscribe to specific parent image tag builds, the ci.sh rebuilds images from all available upstream tags.

The end result corresponds to the parent image, meaning this image's tags will be the same as gliderlabs/logspout tags. E.g bekt/logspout-logstash:v3.2.5.

A few ceveats:

  1. The produced v1 and v2 images likely do not work as expected, as build.sh was not introduced until v3 in the upstream project.
  2. Builds are going to be extremely slow as we are building multiple images instead of a single image now. I'm not sure of Docker Hub automated builds have a timeout. There might be some optimization around with multi-stage builds, but I haven't looked.
  3. This project assumes build.sh does not change between versions. A better way would be to download the right build.sh file during build time for each version.

I didn't put much thinking or work into this, just went with the fastest way. If there's a better way, let me know.

echo "Upstream tags: $TAGS"

for t in ${TAGS}; do
docker build -t $HUB_REPO:ignore-$t --build-arg UPSTREAM_VERSION=$t .
Copy link
Owner Author

Choose a reason for hiding this comment

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

ignore- will be removed after I get some validation this thing works.

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

Successfully merging this pull request may close these issues.

1 participant