Skip to content

Adjust permissions further for arbitrary user even in the face of plugins with Gemfiles #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions 3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,19 @@ RUN set -eux; \
rm freetds.tar.bz2; \
( cd freetds && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-silent-rules && make -j "$(nproc)" && make -C src install && make -C include install ); \
rm -rf freetds; \
bundle config build.tiny_tds --enable-system-freetds; \
gosu redmine bundle config build.tiny_tds --enable-system-freetds; \
\
bundle install --without development test; \
gosu redmine bundle install --without development test; \
for adapter in mysql2 postgresql sqlserver sqlite3; do \
echo "$RAILS_ENV:" > ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
bundle install --without development test; \
gosu redmine bundle install --without development test; \
cp Gemfile.lock "Gemfile.lock.${adapter}"; \
done; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
chmod ugo=rwX Gemfile.lock; \
chmod -R ugo=rwX Gemfile.lock "$GEM_HOME"; \
rm -rf ~redmine/.bundle; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
Expand Down
9 changes: 5 additions & 4 deletions 3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,19 @@ RUN set -eux; \
rm freetds.tar.bz2; \
( cd freetds && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-silent-rules && make -j "$(nproc)" && make -C src install && make -C include install ); \
rm -rf freetds; \
bundle config build.tiny_tds --enable-system-freetds; \
gosu redmine bundle config build.tiny_tds --enable-system-freetds; \
\
bundle install --without development test; \
gosu redmine bundle install --without development test; \
for adapter in mysql2 postgresql sqlserver sqlite3; do \
echo "$RAILS_ENV:" > ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
bundle install --without development test; \
gosu redmine bundle install --without development test; \
cp Gemfile.lock "Gemfile.lock.${adapter}"; \
done; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
chmod ugo=rwX Gemfile.lock; \
chmod -R ugo=rwX Gemfile.lock "$GEM_HOME"; \
rm -rf ~redmine/.bundle; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,19 @@ RUN set -eux; \
rm freetds.tar.bz2; \
( cd freetds && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-silent-rules && make -j "$(nproc)" && make -C src install && make -C include install ); \
rm -rf freetds; \
bundle config build.tiny_tds --enable-system-freetds; \
gosu redmine bundle config build.tiny_tds --enable-system-freetds; \
\
bundle install --without development test; \
gosu redmine bundle install --without development test; \
for adapter in mysql2 postgresql sqlserver sqlite3; do \
echo "$RAILS_ENV:" > ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
bundle install --without development test; \
gosu redmine bundle install --without development test; \
cp Gemfile.lock "Gemfile.lock.${adapter}"; \
done; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
chmod ugo=rwX Gemfile.lock; \
chmod -R ugo=rwX Gemfile.lock "$GEM_HOME"; \
rm -rf ~redmine/.bundle; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
Expand Down