import
This commit is contained in:
commit
0c9cf191e0
23
.gitlab-ci.yml
Normal file
23
.gitlab-ci.yml
Normal file
@ -0,0 +1,23 @@
|
||||
image: docker:latest
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
|
||||
build-master:
|
||||
stage: build
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
||||
- docker push "$CI_REGISTRY_IMAGE"
|
||||
only:
|
||||
- master
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||
except:
|
||||
- master
|
||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
FROM "php:7.1-apache"
|
||||
MAINTAINER "Julien Cabillot <dockerimages@cabillot.eu>"
|
||||
|
||||
RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
|
||||
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf' && \
|
||||
echo -e "RemoteIPHeader X-Real-IP\nRemoteIPProxiesHeader X-Forwarded-By" > "${APACHE_CONFDIR}/conf-available/remoteip.conf" && \
|
||||
a2enconf remoteip && \
|
||||
a2enmod remoteip && \
|
||||
apt-get -y autoremove --purge && \
|
||||
apt-get -y clean all && \
|
||||
rm -rf "/usr/share/doc/*" \
|
||||
"/var/cache/*" \
|
||||
"/var/lib/apt/lists/*" \
|
||||
"/usr/src/*" \
|
||||
"/var/cache/*" \
|
||||
"/var/log/"{apt/*,dpkg.log} \
|
||||
"/var/www/html" \
|
||||
"/tmp/*"
|
||||
|
||||
# Add Tini
|
||||
ENV "TINI_VERSION" "v0.16.1"
|
||||
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
|
||||
RUN chmod +x "/tini"
|
||||
ENTRYPOINT ["/tini", "--"]
|
||||
|
||||
CMD [ "docker-php-entrypoint", "apache2-foreground" ]
|
||||
|
||||
HEALTHCHECK --interval="10s" \
|
||||
CMD curl --fail "http://localhost:8080" || exit 1
|
||||
Loading…
x
Reference in New Issue
Block a user