Dockerfile: change style according to official Dockerfiles
This commit is contained in:
parent
dfc215b63f
commit
b2ebb8a433
23
Dockerfile
23
Dockerfile
@ -5,9 +5,14 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
# Base packages
|
# Base packages
|
||||||
RUN apk update && \
|
RUN apk update \
|
||||||
apk upgrade && \
|
&& apk upgrade \
|
||||||
apk add python3 python3-dev build-base libffi-dev ca-certificates
|
&& apk add \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
build-base \
|
||||||
|
libffi-dev \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
# Python installation
|
# Python installation
|
||||||
# pip
|
# pip
|
||||||
@ -17,16 +22,18 @@ RUN python3 /tmp/install/* && \
|
|||||||
|
|
||||||
# Radicale installation
|
# Radicale installation
|
||||||
RUN mkdir -p /data/config
|
RUN mkdir -p /data/config
|
||||||
|
|
||||||
COPY . /data/radicale
|
COPY . /data/radicale
|
||||||
COPY config /data/config
|
COPY config /data/config
|
||||||
|
|
||||||
RUN cd /data/radicale && python3 setup.py install
|
RUN cd /data/radicale && python3 setup.py install
|
||||||
|
|
||||||
# User
|
# User
|
||||||
RUN adduser -h /home/radicale -D radicale && \
|
RUN adduser -h /home/radicale -D radicale \
|
||||||
mkdir -p /home/radicale/.config && \
|
&& mkdir -p /home/radicale/.config \
|
||||||
ln -s /data/config /home/radicale/.config/radicale && \
|
&& ln -s /data/config /home/radicale/.config/radicale \
|
||||||
chown -R radicale:radicale /data/config && \
|
&& chown -R radicale:radicale /data/config \
|
||||||
chown -R radicale:radicale /home/radicale
|
&& chown -R radicale:radicale /home/radicale
|
||||||
|
|
||||||
USER radicale
|
USER radicale
|
||||||
WORKDIR /home/radicale
|
WORKDIR /home/radicale
|
||||||
|
Loading…
Reference in New Issue
Block a user