File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ WORKDIR /var/www/html
6
6
7
7
# Update packages and install dependencies
8
8
RUN apk upgrade --no-cache && \
9
- apk add --no-cache sqlite-dev libpng libpng-dev libjpeg-turbo libjpeg-turbo-dev freetype freetype-dev curl autoconf libgomp icu-dev icu-data-full nginx dcron tzdata imagemagick imagemagick-dev libzip-dev sqlite libwebp-dev && \
9
+ apk add --no-cache shadow sqlite-dev libpng libpng-dev libjpeg-turbo libjpeg-turbo-dev freetype freetype-dev curl autoconf libgomp icu-dev icu-data-full nginx dcron tzdata imagemagick imagemagick-dev libzip-dev sqlite libwebp-dev && \
10
10
docker-php-ext-install pdo pdo_sqlite calendar && \
11
11
docker-php-ext-enable pdo pdo_sqlite && \
12
12
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
Original file line number Diff line number Diff line change @@ -114,10 +114,12 @@ See instructions to run Wallos below.
114
114
``` bash
115
115
docker run -d --name wallos -v /path/to/config/wallos/db:/var/www/html/db \
116
116
-v /path/to/config/wallos/logos:/var/www/html/images/uploads/logos \
117
- -e TZ=Europe/Berlin -p 8282:80 --restart unless-stopped \
117
+ -e TZ=Europe/Berlin -e PUID=82 -e PGID=82 - p 8282:80 --restart unless-stopped \
118
118
bellamy/wallos:latest
119
119
```
120
120
121
+ Note: PUID and PGUID are optional, defaults to 82. Will let you run as an arbitrary user.
122
+
121
123
### Docker Compose
122
124
123
125
```
@@ -129,6 +131,9 @@ services:
129
131
- "8282:80/tcp"
130
132
environment:
131
133
TZ: 'America/Toronto'
134
+ # PUID and PGUID are optional, defaults to 82. Will let you run as an arbitrary user.
135
+ # PUID: 82
136
+ # PGID: 82
132
137
# Volumes store your data between container upgrades
133
138
volumes:
134
139
- './db:/var/www/html/db'
Original file line number Diff line number Diff line change 2
2
3
3
echo " Startup script is running..." > /var/log/startup.log
4
4
5
- # If the PUID or PGID environment variables are set, create a new user and group
6
- if [ ! -z " $PUID " ] && [ ! -z " $PGID " ]; then
7
- addgroup -g $PGID appgroup
8
- adduser -D -u $PUID -G appgroup appuser
9
- chown -R appuser:appgroup /var/www/html
10
- fi
5
+ # Default the PUID and PGID environment variables to 82, otherwise
6
+ # set to the user defined ones.
7
+ PUID=${PUID:- 82}
8
+ PGID=${PGID:- 82}
9
+
10
+ # Change the www-data user id and group id to be the user-specified ones
11
+ groupmod -o -g " $PGID " www-data
12
+ usermod -o -u " $PUID " www-data
13
+ chown -R www-data:www-data /var/www/html
11
14
12
15
# Start both PHP-FPM and Nginx
13
16
php-fpm & nginx -g ' daemon off;' & touch ~ /startup.txt
You can’t perform that action at this time.
0 commit comments