镜像地址:
docker pull nn200433/siyuan
该镜像基于官方镜像,只进行默认 uid/gid:1000
的 siyuan
用户删除
Dockerfile:
FROM alpine:latest
MAINTAINER 1649991905@qq.com
# 定义环境变量
#ENV USER_UID=1000
#ENV USER_GID=1000
ENV TZ=Asia/Shanghai
ENV LANG=zh_CN.UTF-8
ENV LC_ALL=zh_CN.UTF-8
ENV LANGUAGE=zh_CN.UTF-8
# 拷贝编译文件
COPY siyuan /opt/siyuan/
WORKDIR /opt/siyuan/
# 设置时区为上海
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories && \
apk add -U --no-cache ca-certificates tzdata && \
cp /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo ${TZ} > /etc/timezone && \
apk del tzdata
# 添加用户
#RUN addgroup --gid ${USER_GID} siyuan && \
# adduser --uid ${USER_UID} --ingroup siyuan --disabled-password siyuan && \
# chown -R siyuan:siyuan /opt/siyuan/
#USER siyuan
EXPOSE 6806
ENTRYPOINT ["/opt/siyuan/kernel"]
部署运行:
version: '3'
services:
siyuan:
volumes:
- /home/siyuan/notes:/SiYuan/
network_mode: host
restart: always
container_name: siyuan
image: 'nn200433/siyuan:1.7.2'
command: [--resident=true,--workspace=/SiYuan]
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于