Skip to content

Commit d747fd5

Browse files
author
el Pablo
committed
change name UID variable, to U_ID, some system can't write UID variable in the host enviroment
1 parent b532085 commit d747fd5

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ MAGE_DOMAIN=painlessmagento.test
88

99
# use the uid of the host owner of /src directory
1010
# using bash or bash for windows you can get this values with this lines
11-
# echo $UID
11+
# echo $U_ID
1212
# echo $USERNAME
13-
UID=33
13+
U_ID=33
1414
WEB_USER=www-data
1515

1616
# first 3 parts of local ip network you like to use

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ You can customize them in the `.env` file before run the instalation
157157
| ---------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
158158
| MAGE_DOMAIN | painlessmagento.test | |
159159
| ROOT_PROJECT | _Commented_ | DOCKER-TOOLS USERS ONLY <br>patch for use volumes, outsite c:/Users in windows,<br> 1) add the project's directory to the shared directories in your VM. <br>2) uncomment ROOT_PROJECT line and write the address you add inside the VM. |
160-
| UID | 33 | Use the uid of the host owner of /src directory <br> Using bash or bash for windows you can get this using <br> `echo $UID` |
160+
| U_ID | 33 | Use the uid of the host owner of /src directory <br> Using bash or bash for windows you can get this using <br> `echo $UID` |
161161
| WEB_USER | www-data | Using bash or bash for windows you can get this using <br> `echo $USERNAME` |
162162
| NETWORK_BASE | 169.254.81 | first 3 parts of local ip network you like to use |
163163
| PHPMYADMIN_PORT | 8080 | You can access `phpmyadmin` using http://MAGE_DOMAIN:PHPMYADMIN_PORT <br>_TODO: add phpadmin to nginx adding a subdomain and add SSL certification_ |

bin/console.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535
# execute the file that sets the environment variables
3636
. $ENVIRONMENTVARIABLESFILE
3737

38-
if [ -z "$ROOT_PROJECT"]; then
38+
if [ -z "$ROOT_PROJECT" ]; then
3939
ROOT_PROJECT=$(pwd)
4040
exit 1
4141
fi

config/nginx/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM nginx:alpine
22

3-
ARG UID=33
3+
ARG U_ID=33
44
ARG WEB_USER=www-data
55

6-
RUN addgroup -g $UID ${WEB_USER} \
7-
&& adduser -u $UID -D -G ${WEB_USER} ${WEB_USER} \
6+
RUN addgroup -g $U_ID ${WEB_USER} \
7+
&& adduser -u $U_ID -D -G ${WEB_USER} ${WEB_USER} \
88
&& mkdir -p /sock \
99
&& touch /sock/docker.sock \
1010
&& chown -R ${WEB_USER}:${WEB_USER} /sock

config/php/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM php:7.2-fpm-alpine
22

3-
ARG UID=82
3+
ARG U_ID=33
44
ARG WEB_USER=www-data
55
ARG ENVIROMENT=production
66
ARG MAGE_DOMAIN=magedocker.test
@@ -39,8 +39,8 @@ RUN mkdir /etc/ssmtp \
3939
&& chown root:root /usr/local/etc/php-fpm.d/zz-docker.conf \
4040
/usr/local/etc/php/php.ini \
4141
/etc/ssmtp/ssmtp.conf \
42-
&& addgroup -g $UID -S ${WEB_USER} \
43-
&& adduser -u $UID -h /home/${WEB_USER} -S -D -G ${WEB_USER} ${WEB_USER} \
42+
&& addgroup -g $U_ID -S ${WEB_USER} \
43+
&& adduser -u $U_ID -h /home/${WEB_USER} -S -D -G ${WEB_USER} ${WEB_USER} \
4444
&& mkdir -p /home/${WEB_USER}/html \
4545
#configure nginx - fpm socket and log
4646
&& mkdir -p /sock \

0 commit comments

Comments
 (0)