Add chmod to wordir in Dockerfile

This commit is contained in:
Kristóf Tóth 2018-02-09 17:25:38 +01:00
parent 7720c63bc8
commit 545b972296

View File

@ -65,7 +65,7 @@ ENV PYTHONPATH=${TFW_LIB_DIR}
COPY nginx/nginx.conf ${TFW_NGINX_CONF} COPY nginx/nginx.conf ${TFW_NGINX_CONF}
COPY nginx/components/ ${TFW_NGINX_COMPONENTS} COPY nginx/components/ ${TFW_NGINX_COMPONENTS}
RUN chown -R ${AVATAO_USER}: /var/log/nginx /var/lib/nginx &&\ RUN chown -R ${AVATAO_USER} /var/log/nginx /var/lib/nginx &&\
sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf &&\ sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf &&\
for f in "${TFW_NGINX_CONF}" ${TFW_NGINX_COMPONENTS}/*.conf; do \ for f in "${TFW_NGINX_CONF}" ${TFW_NGINX_COMPONENTS}/*.conf; do \
envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" < $f > $f ;\ envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" < $f > $f ;\
@ -83,7 +83,7 @@ COPY src/event_handlers/source_code_server/server.py ${TFW_LOGIN_APP_DIR}/
COPY src/event_handlers/source_code_server/users.db ${TFW_LOGIN_APP_DIR}/ COPY src/event_handlers/source_code_server/users.db ${TFW_LOGIN_APP_DIR}/
COPY src/event_handlers/source_code_server/login_component.py ${TFW_WEBIDE_WD}/ COPY src/event_handlers/source_code_server/login_component.py ${TFW_WEBIDE_WD}/
RUN chown -R ${AVATAO_USER} ${TFW_WEBIDE_WD} RUN chown -R ${AVATAO_USER} ${TFW_WEBIDE_WD} && chmod -R 755 ${TFW_WEBIDE_WD}
USER ${AVATAO_USER} USER ${AVATAO_USER}
WORKDIR /home/${AVATAO_USER} WORKDIR /home/${AVATAO_USER}