Skip to content

Commit

Permalink
Fixing chmod permissions under root user
Browse files Browse the repository at this point in the history
  • Loading branch information
visitsb committed May 24, 2020
1 parent 200a7f6 commit f03b158
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM wordpress:apache
LABEL maintainer="Shanti Naik <visitsb@gmail.com>"

# https://serverfault.com/a/960335
# chmod doesn't work correctly
USER root

# Our script that enables hosting Wordpress in a subfolder
# Script name is 'intentional' - has to start with apache2* to allow
# Wordpress ENTRYPOINT ["docker-entrypoint.sh"] to execute it's logic before
Expand All @@ -16,6 +20,8 @@ COPY apache2-wordpress.sh /usr/local/bin/
# to explicitly specify CMD).
# https://github.com/moby/moby/issues/5147

RUN /bin/chmod +x /usr/local/bin/apache2-wordpress.sh

# When environment variable WORDPRESS_ROOTDIR is set
# The subfolder will be created under default Wordpress root dir
CMD ["apache2-wordpress.sh"]

0 comments on commit f03b158

Please sign in to comment.