forked from jeroenpeeters/docker-ssh
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (30 loc) · 769 Bytes
/
Copy pathDockerfile
File metadata and controls
43 lines (30 loc) · 769 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
FROM i3c/base/alpine as build
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/
RUN npm install && npm cache clean --force
COPY . /usr/src/app
CMD ["npm", "start"]
FROM alpine:3.6
RUN apk update \
&& apk add nodejs nodejs-npm \
&& rm -rf /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp
RUN apk update && apk upgrade && apk add git bash
# Connect to container with name/id
ENV CONTAINER=
# Shell to use inside the container
ENV CONTAINER_SHELL=bash
# Server key
ENV KEYPATH=./id_rsa
# Server port
ENV PORT=22
# Enable web terminal
ENV HTTP_ENABLED=true
# HTTP Port
ENV HTTP_PORT=8022
EXPOSE 22 8022
COPY --from=build /usr/src/app /usr/src/app
WORKDIR /usr/src/app
CMD ["npm", "start"]