Open bparanj opened 7 years ago
hi @bparanj , sorry for the delay. I just ran docker-compose build
on a fresh clone of the repo and everything worked fine. Are you still having this issue?
@bparanj and @pacuna. i've made these changes in Dockerfile and it works like a charm for me:
Updated! My final Dockerfile:
FROM phusion/passenger-ruby24
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
# Additional packages: we are adding the netcat package so we can
# make pings to the database service
RUN apt-get update && apt-get install -y -o Dpkg::Options::="--force-confold" netcat
# Enable Nginx and Passenger
RUN rm -f /etc/service/nginx/down
# Add virtual host entry for the application. Make sure
# the file is in the correct path
RUN rm /etc/nginx/sites-enabled/default
ADD webapp.conf /etc/nginx/sites-enabled/webapp.conf
# In case we need some environmental variables in Nginx. Make sure
# the file is in the correct path
ADD rails-env.conf /etc/nginx/main.d/rails-env.conf
# Install gems: it's better to build an independent layer for the gems
# so they are cached during builds unless Gemfile changes WORKDIR /tmp
WORKDIR /home/me/Desktop/webapp
COPY Gemfile /home/me/Desktop/webapp/Gemfile
COPY Gemfile.lock /home/me/Desktop/webapp/Gemfile.lock
RUN bundle install
COPY . /home/me/Desktop/webapp
RUN apt-get install -y tzdata
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 80
Ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
I hope be helpful!
Regards!