From 91d247031f515a72ae59f0ec0bad26d099937939 Mon Sep 17 00:00:00 2001 From: atompi Date: Thu, 25 Jan 2018 01:49:39 -0800 Subject: [PATCH] Add Dockerfile --- Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..94fcb03 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM ubuntu:16.04 + +# prepare +COPY sources.list /etc/apt/sources.list +RUN echo "nameserver 114.114.114.114" >> /etc/resolv.conf +RUN apt-get update + +# install gcc-multilib +RUN apt-get install -y gcc make gcc-multilib curl +RUN apt-get -y autoremove +RUN rm -rf /var/lib/apt/lists/* + +# install nodejs +RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - +RUN apt-get install -y nodejs +RUN npm install -g cnpm --registry=https://registry.npm.taobao.org + +WORKDIR /app/zing-gallery + +ADD . /app/zing-gallery/ + +# cnpm install +RUN cnpm install + +EXPOSE 3000 + +# startup +ENTRYPOINT ["npm", "run", "start"]