forked from victor-rds/docker-lufi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (45 loc) · 1.54 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM alpine:latest
ARG LUFI_VERSION=master
ENV GID=991 \
UID=991 \
LUFI_DIR=/usr/lufi
LABEL description="lufi on alpine" \
maintainer="Stefan Bellon <https://github.com/sbellon>"
RUN apk add --update --no-cache --virtual .build-deps \
build-base \
libressl-dev \
ca-certificates \
tar \
perl-dev \
libidn-dev \
wget \
&& apk add --update --no-cache \
libressl \
perl \
libidn \
perl-crypt-rijndael \
perl-test-manifest \
perl-net-ssleay \
tini \
su-exec \
git \
curl \
&& echo | cpan \
&& cpan install CPAN \
&& cpan reload CPAN \
&& cpan install Carton \
&& git clone -b ${LUFI_VERSION} https://framagit.org/fiat-tux/hat-softwares/lufi ${LUFI_DIR} \
&& cd ${LUFI_DIR} \
&& carton install --deployment --without=test --without=swift-storage --without=ldap --without=postgresql --without=mysql --without=htpasswd \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /root/.cpan* ${LUFI_DIR}/local/cache/*
WORKDIR ${LUFI_DIR}
VOLUME ${LUFI_DIR}/data ${LUFI_DIR}/files
EXPOSE 8081
COPY startup /usr/local/bin/startup
COPY lufi.conf.template ${LUFI_DIR}/lufi.conf.template
RUN chmod +x /usr/local/bin/startup
USER ${UID}:${GID}
HEALTHCHECK CMD curl --silent --head --fail http://127.0.0.1:8081/ || exit 1
USER root:root
CMD ["/usr/local/bin/startup"]