forked from edmund-wagner/fake-smtp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 794 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ---- Base Node ----
FROM node:carbon AS base
# Create app directory
WORKDIR /app
# ---- Dependencies ----
FROM base AS dependencies
COPY package*.json ./
COPY yarn.lock ./
RUN yarn install
# ---- Copy Files/Build ----
FROM dependencies AS build
WORKDIR /app
COPY src /app/src
COPY public /app/public
RUN yarn build
RUN yarn install --modules-folder /app/deps --production=true
# --- Release with Alpine ----
FROM node:10.9.0-alpine AS release
WORKDIR /app
COPY --from=build /app/build ./build
COPY --from=build /app/deps ./node_modules
COPY index.js ./
EXPOSE 1025
EXPOSE 1080
CMD node index.js -s ${SMTP_PORT:-1025} --smtp-ip ${SMTP_IP:-0.0.0.0} --http-port ${HTTP_PORT:-1080} --http-ip ${HTTP_IP:-0.0.0.0} --whitelist ${WHITELIST:-''} --max ${MAX:-100} --auth ${AUTH:-''} --headers