-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (24 loc) · 711 Bytes
/
Dockerfile
File metadata and controls
37 lines (24 loc) · 711 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
FROM node:9.2.0-alpine
# Configure volume and directories
RUN mkdir /mkdocs-server /mkdocs-server/data /mkdocs-server/data/repos /mkdocs-server/data/.ssh \
&& chown -R node:node /mkdocs-server
VOLUME /mkdocs-server/data
WORKDIR /mkdocs-server
RUN apk add --update git python py-pip openssh expect
# Only needed for debugging...
RUN apk add --update bash
# Port the server is listening on
ENV PORT 3001
EXPOSE 3001
# Install node dependencies
COPY package.json package.json
RUN npm install
# Build the server
COPY . .
RUN npm run build
# Install Python packages
RUN pip install -r mkdocs-packages.txt
RUN chown -R node:node /mkdocs-server
ENV NODE_ENV PRODUCTION
USER node
CMD ["node", "dist/"]