Files
OpenList/Dockerfile

43 lines
1.6 KiB
Docker
Raw Permalink Normal View History

2025-06-18 14:26:42 +08:00
FROM docker.io/library/alpine:edge AS builder
2022-09-08 20:18:45 +08:00
LABEL stage=go-builder
WORKDIR /app/
2025-06-18 14:26:42 +08:00
RUN apk add --no-cache bash curl jq gcc git go musl-dev
COPY go.mod go.sum ./
RUN go mod download
2022-09-08 20:18:45 +08:00
COPY ./ ./
RUN bash build.sh release docker
2022-09-08 20:18:45 +08:00
2023-11-25 14:22:13 +08:00
FROM alpine:edge
ARG INSTALL_FFMPEG=false
ARG INSTALL_ARIA2=false
chore(docs&ci): change links in files & fix github ci and docker ci (#3) * Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * Update README.md Alist改为OpenList * Update README_cn.md Alist改为OpenList * Update README.md 漏了一处 * Update README_ja.md Alist改为OpenList * Update README_cn.md 漏了一处 * Update CODE_OF_CONDUCT.md 更改链接 * Update README.md 更新tg链接 * Update README_cn.md 更新tg链接 * Update README_ja.md 更新tg链接 * chore(build&docs): use new links in build and github templates * Update README.md 更新团队名 * chore: disable translation update, change beta release into artifacts * fix: disable docker build and name the uploaded artifacts * fix typo * Update README_cn.md 更新团队名称 * Update README_ja.md 更新 * Update project name in CONTRIBUTING.md * Update README_cn.md 更新 * Update README.md 更新 * Update README_ja.md * fix: fix artifact name * chore(build.sh): use original musl.cc * fix(ci): fix action artifacts upload * Update CODE_OF_CONDUCT.md TG更改为Telegram * Update README_cn.md 更新论坛链接 * Update README.md 更新论坛链接 * Update README_ja.md 更新论坛链接 * feat: update community based call back for onedrive * chore(ci): update musl.cc link * chore: use openlist as name instead of default OpenList * Update user.go * chore: fix artifact name * feat(ci): add docker build test * fix: add more platforms * fix: explicitly use docker.io * fix: fix typo * fix(docker): fix test build push platform * chore: change to OpenListTeam * Update CODE_OF_CONDUCT.md * doc: update org name * docs: change repo urls * feat: release docker image to ghcr.io on tagging * fix: fix the name of test_docker * build: update the names in docker-compose and docker file * chore: rename --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: 绎泽 <yize@tencent.to> Co-authored-by: zyk2507 <93830642+zyk2507@users.noreply.github.com>
2025-06-12 21:29:43 +08:00
LABEL MAINTAINER="OpenList"
chore(docs&ci): change links in files & fix github ci and docker ci (#3) * Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * Update README.md Alist改为OpenList * Update README_cn.md Alist改为OpenList * Update README.md 漏了一处 * Update README_ja.md Alist改为OpenList * Update README_cn.md 漏了一处 * Update CODE_OF_CONDUCT.md 更改链接 * Update README.md 更新tg链接 * Update README_cn.md 更新tg链接 * Update README_ja.md 更新tg链接 * chore(build&docs): use new links in build and github templates * Update README.md 更新团队名 * chore: disable translation update, change beta release into artifacts * fix: disable docker build and name the uploaded artifacts * fix typo * Update README_cn.md 更新团队名称 * Update README_ja.md 更新 * Update project name in CONTRIBUTING.md * Update README_cn.md 更新 * Update README.md 更新 * Update README_ja.md * fix: fix artifact name * chore(build.sh): use original musl.cc * fix(ci): fix action artifacts upload * Update CODE_OF_CONDUCT.md TG更改为Telegram * Update README_cn.md 更新论坛链接 * Update README.md 更新论坛链接 * Update README_ja.md 更新论坛链接 * feat: update community based call back for onedrive * chore(ci): update musl.cc link * chore: use openlist as name instead of default OpenList * Update user.go * chore: fix artifact name * feat(ci): add docker build test * fix: add more platforms * fix: explicitly use docker.io * fix: fix typo * fix(docker): fix test build push platform * chore: change to OpenListTeam * Update CODE_OF_CONDUCT.md * doc: update org name * docs: change repo urls * feat: release docker image to ghcr.io on tagging * fix: fix the name of test_docker * build: update the names in docker-compose and docker file * chore: rename --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: 绎泽 <yize@tencent.to> Co-authored-by: zyk2507 <93830642+zyk2507@users.noreply.github.com>
2025-06-12 21:29:43 +08:00
WORKDIR /opt/openlist/
RUN apk update && \
apk upgrade --no-cache && \
2025-06-18 14:26:42 +08:00
apk add --no-cache bash ca-certificates su-exec tzdata; \
[ "$INSTALL_FFMPEG" = "true" ] && apk add --no-cache ffmpeg; \
[ "$INSTALL_ARIA2" = "true" ] && apk add --no-cache curl aria2 && \
mkdir -p /opt/aria2/.aria2 && \
wget https://github.com/P3TERX/aria2.conf/archive/refs/heads/master.tar.gz -O /tmp/aria-conf.tar.gz && \
tar -zxvf /tmp/aria-conf.tar.gz -C /opt/aria2/.aria2 --strip-components=1 && rm -f /tmp/aria-conf.tar.gz && \
sed -i 's|rpc-secret|#rpc-secret|g' /opt/aria2/.aria2/aria2.conf && \
sed -i 's|/root/.aria2|/opt/aria2/.aria2|g' /opt/aria2/.aria2/aria2.conf && \
sed -i 's|/root/.aria2|/opt/aria2/.aria2|g' /opt/aria2/.aria2/script.conf && \
sed -i 's|/root|/opt/aria2|g' /opt/aria2/.aria2/aria2.conf && \
sed -i 's|/root|/opt/aria2|g' /opt/aria2/.aria2/script.conf && \
touch /opt/aria2/.aria2/aria2.session && \
/opt/aria2/.aria2/tracker.sh ; \
rm -rf /var/cache/apk/*
chore(docs&ci): change links in files & fix github ci and docker ci (#3) * Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * Update README.md Alist改为OpenList * Update README_cn.md Alist改为OpenList * Update README.md 漏了一处 * Update README_ja.md Alist改为OpenList * Update README_cn.md 漏了一处 * Update CODE_OF_CONDUCT.md 更改链接 * Update README.md 更新tg链接 * Update README_cn.md 更新tg链接 * Update README_ja.md 更新tg链接 * chore(build&docs): use new links in build and github templates * Update README.md 更新团队名 * chore: disable translation update, change beta release into artifacts * fix: disable docker build and name the uploaded artifacts * fix typo * Update README_cn.md 更新团队名称 * Update README_ja.md 更新 * Update project name in CONTRIBUTING.md * Update README_cn.md 更新 * Update README.md 更新 * Update README_ja.md * fix: fix artifact name * chore(build.sh): use original musl.cc * fix(ci): fix action artifacts upload * Update CODE_OF_CONDUCT.md TG更改为Telegram * Update README_cn.md 更新论坛链接 * Update README.md 更新论坛链接 * Update README_ja.md 更新论坛链接 * feat: update community based call back for onedrive * chore(ci): update musl.cc link * chore: use openlist as name instead of default OpenList * Update user.go * chore: fix artifact name * feat(ci): add docker build test * fix: add more platforms * fix: explicitly use docker.io * fix: fix typo * fix(docker): fix test build push platform * chore: change to OpenListTeam * Update CODE_OF_CONDUCT.md * doc: update org name * docs: change repo urls * feat: release docker image to ghcr.io on tagging * fix: fix the name of test_docker * build: update the names in docker-compose and docker file * chore: rename --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: 绎泽 <yize@tencent.to> Co-authored-by: zyk2507 <93830642+zyk2507@users.noreply.github.com>
2025-06-12 21:29:43 +08:00
COPY --chmod=755 --from=builder /app/bin/openlist ./
COPY --chmod=755 entrypoint.sh /entrypoint.sh
RUN /entrypoint.sh version
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
chore(docs&ci): change links in files & fix github ci and docker ci (#3) * Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * Update README.md Alist改为OpenList * Update README_cn.md Alist改为OpenList * Update README.md 漏了一处 * Update README_ja.md Alist改为OpenList * Update README_cn.md 漏了一处 * Update CODE_OF_CONDUCT.md 更改链接 * Update README.md 更新tg链接 * Update README_cn.md 更新tg链接 * Update README_ja.md 更新tg链接 * chore(build&docs): use new links in build and github templates * Update README.md 更新团队名 * chore: disable translation update, change beta release into artifacts * fix: disable docker build and name the uploaded artifacts * fix typo * Update README_cn.md 更新团队名称 * Update README_ja.md 更新 * Update project name in CONTRIBUTING.md * Update README_cn.md 更新 * Update README.md 更新 * Update README_ja.md * fix: fix artifact name * chore(build.sh): use original musl.cc * fix(ci): fix action artifacts upload * Update CODE_OF_CONDUCT.md TG更改为Telegram * Update README_cn.md 更新论坛链接 * Update README.md 更新论坛链接 * Update README_ja.md 更新论坛链接 * feat: update community based call back for onedrive * chore(ci): update musl.cc link * chore: use openlist as name instead of default OpenList * Update user.go * chore: fix artifact name * feat(ci): add docker build test * fix: add more platforms * fix: explicitly use docker.io * fix: fix typo * fix(docker): fix test build push platform * chore: change to OpenListTeam * Update CODE_OF_CONDUCT.md * doc: update org name * docs: change repo urls * feat: release docker image to ghcr.io on tagging * fix: fix the name of test_docker * build: update the names in docker-compose and docker file * chore: rename --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: 绎泽 <yize@tencent.to> Co-authored-by: zyk2507 <93830642+zyk2507@users.noreply.github.com>
2025-06-12 21:29:43 +08:00
VOLUME /opt/openlist/data/
EXPOSE 5244 5245
CMD [ "/entrypoint.sh" ]