1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 10:04:01 +02:00

Fixed broken Dockerfile and docker-startup.sh

Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
Marco Dickert
2020-01-13 18:31:26 +01:00
parent de11f1a3fd
commit af9921f4fb
2 changed files with 11 additions and 6 deletions

View File

@@ -6,9 +6,9 @@ ENV IFM_ROOT_DIR="/var/www" \
IFM_TMP_DIR="/tmp"
# add missing extensions and dependencies
RUN apk add --no-cache libbz2 libzip libcap
apk add --no-cache --virtual .php-extension-build-deps bzip2 bzip2-dev libzip-dev
docker-php-ext-install bz2 zip
RUN apk add --no-cache libbz2 libzip libcap sudo && \
apk add --no-cache --virtual .php-extension-build-deps bzip2 bzip2-dev libzip-dev && \
docker-php-ext-install bz2 zip && \
apk del --no-cache --purge .php-extension-build-deps
# allow php binary to bind ports <1000, even if $USER != root

View File

@@ -1,5 +1,5 @@
#!/bin/sh
set -e
set -xe
if [ ! -z $IFM_DOCKER_UID ]; then
if [ -z $IFM_DOCKER_GID ]; then
@@ -15,8 +15,13 @@ if [ ! -z $IFM_DOCKER_UID ]; then
REAL_GROUP=$(getent group $IFM_DOCKER_GID | sed "s/:.*//")
fi
adduser -u $IFM_DOCKER_UID -HDG $REAL_GROUP ifm
sudo -E -u ifm -c "php -S 0:80 -t /usr/local/share/webapps/ifm"
else
adduser -HD ifm
deluser xfs
deluser www-data
addgroup -g 33 -S www-data
adduser -SHD -u 33 -G www-data www-data
getent passwd
sudo -E -u www-data php -S 0:80 -t /usr/local/share/webapps/ifm
fi
su ifm -c "php -S 0:80 -t /usr/local/share/webapps/ifm"