-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (36 loc) · 828 Bytes
/
Dockerfile
File metadata and controls
47 lines (36 loc) · 828 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
44
45
46
47
FROM elixir:1.14-alpine AS builder
# Set working directory
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache \
git \
build-base
# Copy project files
COPY mix.exs ./
COPY config config
COPY lib lib
# Build release
RUN mix local.hex --force && \
mix local.rebar --force && \
mix deps.get && \
MIX_ENV=prod mix release
# Create final image
FROM alpine:3.18
# Install runtime dependencies
RUN apk add --no-cache \
bash \
iptables \
libgcc \
libstdc++ \
ppp
# Copy release from builder
COPY --from=builder /app/_build/prod/rel/phoenix_vpn /phoenix_vpn
# Copy startup script
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
# Expose PPTP port
EXPOSE 1723
# Set environment
ENV REPLACE_OS_VARS=true
# Start VPN server
ENTRYPOINT ["/docker-entrypoint.sh"]