use gitlab docker registry

This commit is contained in:
Sebastian Hugentobler 2017-09-06 10:46:01 +02:00
parent bdf253be3d
commit c2aad1da9e
6 changed files with 51 additions and 31 deletions

View file

@ -1,28 +1,38 @@
FROM quay.io/thallian/confd-env:latest
#FROM alpine:latest as builder
ENV PROFTP_VERSION v1.3.6
#ENV PROFTP_VERSION v1.3.6
RUN addgroup -g 2222 proftp
RUN adduser -h /var/lib/proftp -u 2222 -D -G proftp proftp
#ADD /rootfs /
#RUN apk add --no-cache libressl openssh-client tar gcc make g++ openldap-dev zlib-dev file
#RUN mkdir /tmp/proftpd
#RUN wget -qO- https://github.com/proftpd/proftpd/archive/$PROFTP_VERSION.tar.gz | tar -xz -C /tmp/proftpd --strip 1
#WORKDIR /tmp/proftpd
#RUN ./configure --with-modules=mod_ldap:mod_sftp --disable-wtmp
#RUN patch -p1 -i /musl_mempcpy.patch
#RUN make && make install
FROM registry.gitlab.com/thallian/docker-confd-env:master
#COPY --from=builder /usr/local/sbin/proftpd /usr/sbin/proftpd
#COPY --from=builder /usr/local/lib/proftpd /usr/lib/proftpd
RUN apk add --no-cache libressl openssh-client openldap zlib
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
proftpd proftpd-mod_ldap proftpd-mod_sftp
RUN addgroup -g 2222 access
RUN addgroup proftpd access
RUN rm /etc/proftpd/dhparams.pem
RUN mkdir /etc/proftpd/keys/
ADD /rootfs /
RUN apk add --no-cache libressl openssh-client openldap tar gcc make g++ openldap-dev zlib zlib-dev file
RUN mkdir /tmp/proftpd
RUN wget -qO- https://github.com/proftpd/proftpd/archive/$PROFTP_VERSION.tar.gz | tar -xz -C /tmp/proftpd --strip 1
WORKDIR /tmp/proftpd
RUN ./configure --with-modules=mod_ldap:mod_sftp --disable-wtmp
RUN patch -p1 -i /musl_mempcpy.patch
RUN make && make install
RUN rm -r /tmp/proftpd
RUN rm /musl_mempcpy.patch
WORKDIR /
RUN apk del tar gcc make g++ openldap-dev zlib-dev file
VOLUME /var/lib/proftp/keys /var/lib/proftp/data
VOLUME /etc/proftpd/keys /var/lib/ftp/data
EXPOSE 22