diff --git a/code-formatter/Dockerfile b/code-formatter/Dockerfile index 1f5970f..62d6a07 100644 --- a/code-formatter/Dockerfile +++ b/code-formatter/Dockerfile @@ -1,22 +1,25 @@ -FROM node:10-slim +FROM node:12-slim + +ARG PHP_VERSION +ENV PHP_CS_FIXER_IGNORE_ENV=true # https support RUN apt-get update && \ - apt-get install -y apt-transport-https ca-certificates + apt-get install -y apt-transport-https ca-certificates curl gnupg2 # add yarn and php RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ curl -sS https://packages.sury.org/php/apt.gpg | apt-key add - && \ - echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php7.3.list && \ + echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/${PHP_VERSION}.list && \ apt-get update && \ - apt-get install -y yarn php7.3-cli && \ + apt-get install -y yarn ${PHP_VERSION}-cli && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /tmp/* /var/tmp/* # add php fixer -RUN curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.14.0/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && \ +RUN curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.3/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && \ chmod a+x /usr/local/bin/php-cs-fixer WORKDIR /app diff --git a/code-formatter/Makefile b/code-formatter/Makefile index f6ccaf6..19c9972 100644 --- a/code-formatter/Makefile +++ b/code-formatter/Makefile @@ -23,13 +23,15 @@ all : build release build : - docker build --build-arg VERSION=$(VERSION) --build-arg COMMIT_SHA=$(COMMIT) -t $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3 . + docker build --build-arg VERSION=$(VERSION) --build-arg PHP_VERSION="php7.3" --build-arg COMMIT_SHA=$(COMMIT) -t $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3 . + docker build --build-arg VERSION=$(VERSION) --build-arg PHP_VERSION="php7.4" --build-arg COMMIT_SHA=$(COMMIT) -t $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.4 . docker build --build-arg VERSION=$(VERSION) --build-arg COMMIT_SHA=$(COMMIT) -t $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php5.6 . - docker tag $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3 $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION) - docker tag $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3 $(DOCKER_REGISTRY)/$(APP_NAME):latest + docker tag $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.4 $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION) + docker tag $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.4 $(DOCKER_REGISTRY)/$(APP_NAME):latest release : build docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3 + docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.4 docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php5.6 docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION) docker push $(DOCKER_REGISTRY)/$(APP_NAME):latest