-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (20 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
22 lines (20 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM ruby:alpine as config_builder
COPY dante_config_generator.rb .
ARG with_users
ARG all_networks
RUN ruby dante_config_generator.rb
FROM alpine:latest as users_builder
RUN echo '@edge http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk add --no-cache csvtool@edge
COPY users.csv add_users.sh ./
ARG with_users
RUN [ -z "${with_users+x}" ] || cat users.csv | sh add_users.sh
RUN rm users.csv
FROM alpine:latest
RUN echo '@edge http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk add --no-cache --upgrade apk-tools@edge
RUN apk add --no-cache dante-server@edge
COPY --from=config_builder danted.conf /etc/sockd.conf
COPY --from=users_builder /etc/passwd /etc/shadow /etc/
EXPOSE 1080
ENTRYPOINT ["sockd"]