Update code formatter
This commit is contained in:
parent
b99086b922
commit
2e91e01590
@ -1,22 +1,25 @@
|
|||||||
FROM node:10-slim
|
FROM node:12-slim
|
||||||
|
|
||||||
|
ARG PHP_VERSION
|
||||||
|
ENV PHP_CS_FIXER_IGNORE_ENV=true
|
||||||
|
|
||||||
# https support
|
# https support
|
||||||
RUN apt-get update && \
|
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
|
# add yarn and php
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
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 && \
|
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 - && \
|
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 update && \
|
||||||
apt-get install -y yarn php7.3-cli && \
|
apt-get install -y yarn ${PHP_VERSION}-cli && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
|
||||||
# add php fixer
|
# 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
|
chmod a+x /usr/local/bin/php-cs-fixer
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@ -23,13 +23,15 @@ all : build release
|
|||||||
|
|
||||||
|
|
||||||
build :
|
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 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.4 $(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):latest
|
||||||
|
|
||||||
release : build
|
release : build
|
||||||
docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)-php7.3
|
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)-php5.6
|
||||||
docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)
|
docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(VERSION)
|
||||||
docker push $(DOCKER_REGISTRY)/$(APP_NAME):latest
|
docker push $(DOCKER_REGISTRY)/$(APP_NAME):latest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user