Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ 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
FROM python:3-alpine as users_builder
RUN apk add --no-cache --virtual .build-deps build-base \
&& pip3 install csvkit \
&& apk del --purge .build-deps \
&& rm -rf /tmp/* \
/usr/includes/* \
/usr/share/man/* \
/usr/src/* \
/var/cache/apk/* \
/var/tmp/*
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 echo '@edge http://nl.alpinelinux.org/alpine/edge/community' >> /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
Expand Down