mirror of
https://github.com/php/doc-es.git
synced 2026-03-23 23:12:09 +01:00
[ES] Sync Dockerfile and Makefile: add UID/GID args for non-root builds (#420)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
FROM php:8.2-cli
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git default-jre-headless
|
||||
@@ -9,7 +11,8 @@ ADD https://api.github.com/repos/php/phd/git/refs/heads/master version-phd.json
|
||||
ADD https://api.github.com/repos/php/doc-base/git/refs/heads/master version-doc-base.json
|
||||
|
||||
RUN git clone --depth 1 https://github.com/php/phd.git && \
|
||||
git clone --depth 1 https://github.com/php/doc-base.git
|
||||
git clone --depth 1 https://github.com/php/doc-base.git && \
|
||||
chown -R $UID:$GID phd doc-base
|
||||
|
||||
RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/local.ini
|
||||
|
||||
|
||||
6
Makefile
6
Makefile
@@ -10,7 +10,7 @@ CURRENT_GID := $(shell id -g)
|
||||
# volumes to our Docker runs.
|
||||
#
|
||||
|
||||
PATHS := -v .:/var/www/en
|
||||
PATHS := -v ${PWD}:/var/www/en
|
||||
ifneq ($(wildcard ../doc-base/LICENSE),)
|
||||
PATHS += -v ${PWD}/../doc-base:/var/www/doc-base
|
||||
endif
|
||||
@@ -28,5 +28,7 @@ php: .docker/built
|
||||
build: .docker/built
|
||||
|
||||
.docker/built:
|
||||
docker build .docker -t php/doc-en
|
||||
docker build\
|
||||
--build-arg UID=${CURRENT_UID} --build-arg GID=${CURRENT_GID}\
|
||||
.docker -t php/doc-en
|
||||
touch .docker/built
|
||||
|
||||
Reference in New Issue
Block a user