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

Dockerfile conditional building #69

Open
iBobik opened this issue Jan 16, 2017 · 2 comments
Open

Dockerfile conditional building #69

iBobik opened this issue Jan 16, 2017 · 2 comments

Comments

@iBobik
Copy link

iBobik commented Jan 16, 2017

Currently there are directories for PHP version:

  • 5.6
  • 7.0
  • 7.1

and inside are Dockerfiles:

  • Dockerfile-alpine-cli
  • Dockerfile-alpine-fpm
  • Dockerfile-apache
  • Dockerfile-cli
  • Dockerfile-fpm
  • drupal-00.ini
  • drupal-opcache.ini

It means 3 x 7 = 21 Dockerfiles needed to maintain.

How about to join them to one Dockerfile, but with conditions? This base Dockerfile should be build by a script, artifacts will be similar like current Dockerfiles in this repository.

@zaporylie
Copy link
Member

Sorry for late response but I have extremely busy time at work.

It means 3 x 7 = 21 Dockerfiles needed to maintain.

Actually 3 x 5 = 15

How about to join them to one Dockerfile, but with conditions?

How do you imagine such a conditional build? Whole point of having separate Dockerfiles is that each image has different base image (FROM).

One of the reasons of using Dockerfiles is that Docker Hub "Automated build" integration can process it automatically either on change to this repository or official PHP Image (Base Image).

@iBobik
Copy link
Author

iBobik commented Nov 19, 2017

Testing something similar on my image: https://gitlab.com/janpoboril/drupal-composer-docker

It uses GitLab CI to mirror tags of base image. Feedback wellcome.

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

No branches or pull requests

2 participants