forked from Jigsaw-Code/outline-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 878 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
# Base image - choose a slim OS for efficient containers
FROM alpine:latest
# Install essential packages
RUN apk add --no-cache ca-certificates openssl shadowsocks-libev
# Create a non-root user to run the server (security best practice)
RUN adduser -D outline
# Set up working directory for the Outline components
WORKDIR /opt/outline
# Fetch the necessary Outline Server code and Switch to the working directory
RUN git clone https://github.com/Jigsaw-Code/outline-server.git .
# Install dependencies
RUN cd src/shadowbox && npm install --production
# Build the management server (note: modify metrics_server if needed)
RUN cd src/shadowbox && npm run build
RUN cd ../metrics_server && npm install --production && npm run build
# Specify exposed port
EXPOSE 8080
# Set non-root user
USER outline
# Start the Outline Server
CMD ["node", "src/shadowbox/server.js"]