Skip to content

Commit a881541

Browse files
authored
Merge pull request #141 from infosiftr/home-redmine
Pre-create /home/redmine and set wide permissions on it
2 parents 353524c + 8e34805 commit a881541

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

3.3/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ RUN set -eux; \
6767
ENV RAILS_ENV production
6868
WORKDIR /usr/src/redmine
6969

70+
# https://github.com/docker-library/redmine/issues/138#issuecomment-438834176
71+
# (bundler needs this for running as an arbitrary user)
72+
ENV HOME /home/redmine
73+
RUN set -eux; \
74+
[ ! -d "$HOME" ]; \
75+
mkdir -p "$HOME"; \
76+
chown redmine:redmine "$HOME"; \
77+
chmod 1777 "$HOME"
78+
7079
ENV REDMINE_VERSION 3.3.8
7180
ENV REDMINE_DOWNLOAD_MD5 6ca9284fa1c3571f6c83dd0e0d0fec1b
7281

3.4/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ RUN set -eux; \
6767
ENV RAILS_ENV production
6868
WORKDIR /usr/src/redmine
6969

70+
# https://github.com/docker-library/redmine/issues/138#issuecomment-438834176
71+
# (bundler needs this for running as an arbitrary user)
72+
ENV HOME /home/redmine
73+
RUN set -eux; \
74+
[ ! -d "$HOME" ]; \
75+
mkdir -p "$HOME"; \
76+
chown redmine:redmine "$HOME"; \
77+
chmod 1777 "$HOME"
78+
7079
ENV REDMINE_VERSION 3.4.6
7180
ENV REDMINE_DOWNLOAD_MD5 5f4993446ecf25782f469763c0d32ea1
7281

Dockerfile.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ RUN set -eux; \
6767
ENV RAILS_ENV production
6868
WORKDIR /usr/src/redmine
6969

70+
# https://github.com/docker-library/redmine/issues/138#issuecomment-438834176
71+
# (bundler needs this for running as an arbitrary user)
72+
ENV HOME /home/redmine
73+
RUN set -eux; \
74+
[ ! -d "$HOME" ]; \
75+
mkdir -p "$HOME"; \
76+
chown redmine:redmine "$HOME"; \
77+
chmod 1777 "$HOME"
78+
7079
ENV REDMINE_VERSION %%REDMINE_VERSION%%
7180
ENV REDMINE_DOWNLOAD_MD5 %%REDMINE_DOWNLOAD_MD5%%
7281

0 commit comments

Comments
 (0)