Skip to content

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.

2 participants