-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) · 1.16 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
FROM nginx:1.19
LABEL maintainer "fraoustin@gmail.com"
ENV SET_CONTAINER_TIMEZONE false
ENV CONTAINER_TIMEZONE ""
# manage user www-data
RUN usermod -u 1000 www-data
# manage start container
COPY ./src/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN mkdir /usr/share/docker-entrypoint.pre
RUN mkdir /usr/share/docker-entrypoint.post
COPY ./src/00_init.sh /usr/share/docker-entrypoint.pre/00_init.sh
RUN chmod +x -R /usr/share/docker-entrypoint.pre
# install extra nginx
RUN apt-get update && apt-get install -y \
apache2-utils \
git \
nginx-extras \
&& rm -rf /var/lib/apt/lists/*
COPY ./src/default.conf /etc/nginx/conf.d/default.conf
RUN rm /etc/nginx/sites-enabled/default
# add cmd nginx
COPY ./src/cmd/addauth.sh /usr/bin/addauth
COPY ./src/cmd/rmauth.sh /usr/bin/rmauth
RUN chmod +x /usr/bin/addauth
RUN chmod +x /usr/bin/rmauth
# add theme
RUN mkdir /theme
WORKDIR /theme
RUN git clone https://github.com/fraoustin/Nginx-Fancyindex-Theme.git
COPY ./src/ihm/* /theme/Nginx-Fancyindex-Theme/
ENV COLOR "blue"
RUN mkdir /share
VOLUME /share
ENV DAVUSER user
ENV DAVPASSWORD pass
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["app"]