Skip to content

Instantly share code, notes, and snippets.

@bbachi
Created February 11, 2019 02:21
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 bbachi/7767e719a8cf0fa9b4f04af076ca5d60 to your computer and use it in GitHub Desktop.
Save bbachi/7767e719a8cf0fa9b4f04af076ca5d60 to your computer and use it in GitHub Desktop.
sample docker file
FROM node:8
RUN echo 'Building from base image Node:8'
ENV MONGO_URL=mongodb://mongo:27017/todos
ENV ROOT_URL=http://localhost
ENV PORT=3000
RUN apt-get install -y curl
RUN apt-get update
RUN apt-get install -y --no-install-recommends bsdtar
RUN export tar='bsdtar'
RUN apt-get install sudo -y
RUN curl https://install.meteor.com/ | /bin/sh
RUN useradd meteoruser
RUN mkdir -p /home/meteoruser
RUN chown meteoruser /home/meteoruser
USER meteoruser
WORKDIR /home/meteoruser
RUN git clone https://github.com/bbachi/sampledockerimage.git
RUN echo 'git clone completed'
RUN cd sampledockerimage\
&& meteor npm install\
&& /usr/local/bin/meteor build --directory output\
&& cd output/bundle/programs/server\
&& npm install --production
RUN echo $MONGO_URL
CMD ["node","sampledockerimage/output/bundle/main.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment