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

gitlab-ci.yml-style image/tag specification #697

Closed
peredin opened this issue Jun 8, 2016 · 2 comments
Closed

gitlab-ci.yml-style image/tag specification #697

peredin opened this issue Jun 8, 2016 · 2 comments
Labels

Comments

@peredin
Copy link

peredin commented Jun 8, 2016

I'm using Docker Hub to store a few repositories of commonly used base images, for example a build-base repository setting up make and CMake in multiple environments.

Linking Git tags and branches to Docker tags is quite painful. I want to keep my Git repository clean and well organized and I can't accomplish that. Currently I have two options:

  1. Create a branch for each docker tag and add a Dockerfile to that branch in the root.
  2. Place Dockerfiles in subdirectories (e.g. /debian/Dockerfile), commit everything to master and manually setup Dockerfile paths in Docker Hub.

Option 1 makes the Git repository non-linear. Unless one compares the dates of commits it would not be possible to see that Debian Wheezy was added after Alpine 3.4 (see my example). It's also impossible to checkout master and see the latest Dockerfiles for all images at the same time.

Option 2 makes the Git repository linear but the addition of new distros and/or versions isn't automatic, as I would have to add a rule in the Hub for each new distro. A fix in /debian/Dockerfile for Wheezy after Jessie has been added would also make the commit diffs really ugly if not useless. Fixing that by placing files in /debian/jessie/Dockerfile means even more manual messing with Docker Hub Build Settings.

Instead I would like to specify the names of tags and the Dockerfile to build them in a single file inside my Git repository, e.g. .docker-hub.yml. Just like builds are configured in GitLab CI and other CI-systems.

When a change is pushed to Git, Docker would checkout master and re-build all images based on the contents of the .docker-hub.yml file.

I have created a sample Git repository demonstrating how I would like to be able to specify tags and Dockerfiles. It can be found at https://github.com/peredin/docker-hub-wish.

@rafaelsoaresbr
Copy link

It would be an even more interesting feature if this problem were also implemented #500

@github-actions
Copy link

We are clearing up our old issues and your ticket has been open for one year with no activity. Remove stale label or comment or this will be closed in 15 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants