Skip to content

Dockerfile conditional building #69

Open

Description

@iBobik

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.

Activity

  1. zaporylie commented on Jan 24, 2017

    @zaporylie
    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).

  2. iBobik commented on Nov 19, 2017

    @iBobik
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions