aliyunpan/docker/webdav/Dockerfile

59 lines
1.6 KiB
Docker
Raw Normal View History

2022-01-03 09:55:55 +08:00
# alpine:3.15.0
# 参数
ARG DOCKER_IMAGE_HASH
FROM alpine@sha256:$DOCKER_IMAGE_HASH
LABEL author="tickstep"
LABEL email="tickstep@outlook.com"
LABEL version="1.0"
LABEL description="webdav file server for aliyun cloud drive"
# 时区
ENV TZ=Asia/Shanghai
# 手动下载tzdata安装包注意要下载对应架构的 https://dl-cdn.alpinelinux.org/alpine/v3.15/community/
RUN apk add -U tzdata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 创建运行目录
RUN mkdir -p /home/app
VOLUME /home/app
WORKDIR /home/app
RUN cd /home/app
# 创建配置文件目录
2022-06-16 08:54:09 +08:00
RUN mkdir -p /home/app/config
2022-01-03 09:55:55 +08:00
# 复制文件
2022-06-12 23:07:44 +08:00
COPY ./docker/webdav/app.sh /home/app/app.sh
2022-01-03 09:55:55 +08:00
RUN chmod +x /home/app/app.sh
2022-06-16 14:01:30 +08:00
COPY ./docker/webdav/health_check.sh /home/app/health_check.sh
RUN chmod +x /home/app/health_check.sh
2022-01-03 09:55:55 +08:00
COPY ./out/binary_files/aliyunpan /home/app
2022-06-16 08:54:09 +08:00
RUN mkdir -p /home/app/config/plugin
2022-06-15 22:33:23 +08:00
COPY ./out/binary_files/plugin /home/app/config/plugin
2022-06-16 08:54:09 +08:00
RUN mkdir -p /home/app/config/sync_drive
2022-06-15 22:33:23 +08:00
COPY ./out/binary_files/sync_drive /home/app/config/sync_drive
2022-01-03 09:55:55 +08:00
#RUN chmod +x /home/app/aliyunpan
2022-06-16 14:01:30 +08:00
# 健康检查
HEALTHCHECK --start-period=5s --interval=10s --timeout=5s --retries=3 CMD /bin/sh /home/app/health_check.sh
# 端口
2022-01-03 09:55:55 +08:00
EXPOSE 23077
2022-06-16 14:01:30 +08:00
# 环境变量
ENV ALIYUNPAN_DOCKER=1
2022-01-03 09:55:55 +08:00
ENV ALIYUNPAN_CONFIG_DIR=/home/app/config
ENV ALIYUNPAN_AUTH_USER=admin
ENV ALIYUNPAN_AUTH_PASSWORD=admin
2022-09-29 19:26:20 +08:00
ENV ALIYUNPAN_WEBDAV_MODE=rw
2022-02-08 19:34:22 +08:00
ENV ALIYUNPAN_PAN_DRIVE=File
2022-01-03 09:55:55 +08:00
ENV ALIYUNPAN_PAN_DIR=/
ENV ALIYUNPAN_REFRESH_TOKEN=""
ENV ALIYUNPAN_TRANSFER_URL_TYPE=0
2022-01-08 22:08:04 +08:00
ENV ALIYUNPAN_BLOCK_SIZE=10240
2023-02-19 17:04:45 +08:00
ENV ALIYUNPAN_DEVICE_ID=""
2022-01-03 09:55:55 +08:00
ENTRYPOINT ./app.sh