Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimize docker image #9

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
minimize docker image
  • Loading branch information
yuudi committed Dec 1, 2020
commit 1b60f7db5d88c637fc53ef548e7ed756aa424611
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM node:latest
FROM node:lts-alpine
MAINTAINER Hongcai Deng <admin@dhchouse.com>

RUN apt-get clean all
RUN apt-get update
RUN apt-get -y install git
RUN git clone https://github.com/denghongcai/forsaken-mail.git /forsaken-mail

WORKDIR /forsaken-mail

RUN npm install
RUN wget https://github.com/denghongcai/forsaken-mail/archive/master.tar.gz -q -O /tmp/forsaken-mail-master.tar.gz \
&& tar zxf /tmp/forsaken-mail-master.tar.gz -C /tmp \
&& mv /tmp/forsaken-mail-master/* /forsaken-mail \
&& rm /tmp/forsaken-mail-master.tar.gz \
&& npm install --production \
&& npm cache clean --force

EXPOSE 25
EXPOSE 3000
CMD npm start
CMD ["npm", "start"]