postal/Dockerfile

32 lines
685 B
Docker
Raw Normal View History

2017-04-26 22:35:49 +02:00
FROM ruby:2.4
2017-04-27 09:50:07 +02:00
## Install nodejss
2017-04-26 22:35:49 +02:00
RUN apt-get -y update \
2017-04-27 21:33:05 +02:00
&& apt-get -y install nodejs mysql-client\
2017-04-27 09:50:07 +02:00
&& rm -rf /var/lib/apt/lists/*
2017-04-26 22:35:49 +02:00
## Install required gems
RUN gem install bundler && gem install procodile
## Create user for postal
2017-04-27 10:29:03 +02:00
RUN useradd -r -d /opt/postal -s /bin/bash postal
2017-04-26 22:35:49 +02:00
## Clone postal
2017-04-27 10:29:03 +02:00
RUN git clone https://github.com/atech/postal /opt/postal \
2017-04-26 22:35:49 +02:00
&& chown -R postal:postal /opt/postal/
## Install gems required by postal
2017-04-27 10:29:03 +02:00
RUN /opt/postal/bin/postal bundle /opt/postal/vendor/bundle
2017-04-26 22:35:49 +02:00
2017-04-27 11:38:13 +02:00
## Move config folder
RUN mv /opt/postal/config /opt/postal/config-original
2017-04-26 22:38:01 +02:00
## Stick in startup script
ADD scripts/start.sh /start.sh
2017-04-27 10:48:51 +02:00
## Expose
EXPOSE 5000
2017-04-27 09:50:07 +02:00
## Startup
CMD ["/start.sh"]