Last active
May 16, 2016 19:03
-
-
Save spiette/4a48139c68f3936b2caae3501cab0b64 to your computer and use it in GitHub Desktop.
Dockerfile to run Helianthus application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:latest | |
MAINTAINER Simon Piette <[email protected]> | |
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