Skip to content

Instantly share code, notes, and snippets.

@spiette
Last active May 16, 2016 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spiette/4a48139c68f3936b2caae3501cab0b64 to your computer and use it in GitHub Desktop.
Save spiette/4a48139c68f3936b2caae3501cab0b64 to your computer and use it in GitHub Desktop.
Dockerfile to run Helianthus application
FROM centos:latest
MAINTAINER Simon Piette <simon.piette@savoirfairelinux.com>
RUN yum install --assumeyes sudo vim git ; yum clean all
RUN export uid=1000 gid=1000 && \
cp -a /etc/skel /home/user && \
echo "user:x:${uid}:${gid}:User,,,:/home/user:/bin/bash" >> /etc/passwd && \
echo "user:x:${uid}:" >> /etc/group && \
mkdir -p /etc/sudoers.d && \
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
chmod 0440 /etc/sudoers.d/user && \
chown -R ${uid}:${gid} -R /home/user
RUN yum install --assumeyes https://rpm.nodesource.com/pub_4.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm; \
yum install --assumeyes nodejs; yum clean all
USER user
ENV HOME /home/user
WORKDIR /home/user
RUN git clone https://github.com/erudit/helianthus
WORKDIR helianthus
RUN npm install
COPY Dockerfile /root/Dockerfile
ENV LISTEN 127.0.0.1
ENV PORT 5000
CMD [ "npm", "start" ]
EXPOSE 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment