forked from FreakyBytes/nextcloud-client-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
46 lines (40 loc) · 1.42 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
# Set base image
FROM alpine:latest
# Set container label
LABEL org.opencontainers.image.title="Nextcloud-Client Docker Image" \
org.opencontainers.image.description="Docker image for Nextcloud Sync" \
org.opencontainers.image.documentation="https://github.com/dontobi/nextcloud-client.rpi#readme" \
org.opencontainers.image.authors="Tobias Schug <[email protected]>" \
org.opencontainers.image.url="https://github.com/dontobi/nextcloud-client.rpi" \
org.opencontainers.image.source="https://github.com/dontobi/nextcloud-client.rpi" \
org.opencontainers.image.base.name="docker.io/library/alpine:latest" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${DATI}"
# Set Volumes
# Set Arguments
ARG USER=ncsync
ARG USER_UID=1000
ARG USER_GID=1000
# Set Variables
ENV USER=$USER \
USER_UID=$USER_UID \
USER_GID=$USER_GID \
NC_USER="" \
NC_PASS="" \
NC_INTERVAL=300 \
NC_URL="" \
NC_TRUST_CERT=false \
NC_SOURCE_DIR="/media/nextcloud/" \
NC_PATH="" \
NC_SILENT=false \
NC_EXIT=false \
NC_HIDDEN=false
# Building
# create group and user
RUN addgroup -g $USER_GID $USER && adduser -G $USER -D -u $USER_UID $USER
# update repositories and install nextcloud-client
RUN apk -U --no-cache add nextcloud-client moreutils && rm -rf /etc/apk/cache
# add run script
ADD run.sh /usr/bin/run.sh
# Entrypoint
CMD /usr/bin/run.sh