Skip to content

Commit

Permalink
Fix empty $HOME
Browse files Browse the repository at this point in the history
The `HOME` environment variable is being ignored in phusion/baseimage.
This implements the workaround proposed in
phusion/baseimage-docker#119 (comment).
  • Loading branch information
tsujigiri committed Jul 4, 2019
1 parent 520a79e commit afd9df0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions onbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
FROM docker-rails-base-squashed

ENV RACK_ENV=production RAILS_ENV=production HOME=/home/app \
RAILS_LOG_TO_STDOUT=1 RAILS_SERVE_STATIC_FILES=1
ENV RACK_ENV=production RAILS_ENV=production RAILS_LOG_TO_STDOUT=1 \
RAILS_SERVE_STATIC_FILES=1

# Workaround for $HOME being ignored in phusion/baseimage.
# See: https://github.com/phusion/baseimage-docker/issues/119#issuecomment-287970522
RUN echo /home/app > /etc/container_environment/HOME

CMD ["/sbin/my_init"]
EXPOSE 8080
WORKDIR /home/app/webapp
Expand Down

0 comments on commit afd9df0

Please sign in to comment.