Change docker build to use alpine directly, with PHP and ldap module
This commit is contained in:
parent
482d9670e3
commit
637a0cd0f4
@ -27,6 +27,6 @@ docker:
|
||||
- if [ -f init ]; then chmod 500 init; fi
|
||||
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true"
|
||||
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
|
||||
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||
- docker build -f docker/Dockerfile --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
|
||||
|
10
Dockerfile
10
Dockerfile
@ -1,10 +0,0 @@
|
||||
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
|
||||
|
||||
COPY . /var/www/html/
|
||||
|
||||
RUN mkdir /var/www/.composer \
|
||||
&& ([ -r auth.json ] && mv auth.json /var/www/.composer/) || true \
|
||||
&& touch .composer.refresh \
|
||||
&& mv .env.example .env \
|
||||
&& FORCE_PERMS=1 /sbin/init \
|
||||
&& rm -rf /var/www/.composer/*
|
10
docker/Dockerfile
Normal file
10
docker/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM registry.dege.au/leenooks/php:8.1-fpm-alpine-ldap
|
||||
|
||||
COPY . /var/www/html/
|
||||
|
||||
RUN mkdir -p ${COMPOSER_HOME} && \
|
||||
([ -r auth.json ] && mv auth.json ${COMPOSER_HOME}) || true && \
|
||||
touch .composer.refresh && \
|
||||
mv .env.example .env && \
|
||||
FORCE_PERMS=1 NGINX_START=FALSE /sbin/init && \
|
||||
rm -rf ${COMPOSER_HOME}/*
|
Loading…
Reference in New Issue
Block a user