postal/Dockerfile

26 lines
573 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 09:50:07 +02:00
&& apt-get -y install nodejs \
&& 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-26 22:38:01 +02:00
## Stick in startup script
ADD scripts/start.sh /start.sh
2017-04-27 09:50:07 +02:00
## Startup
CMD ["/start.sh"]