Files
OpenList/Dockerfile

36 lines
1003 B
Docker
Raw Normal View History

### Default image is base. You can add other support by modifying BASE_IMAGE_TAG. The following parameters are supported: base (default), aria2, ffmpeg, aio
ARG BASE_IMAGE_TAG=base
FROM 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
FROM openlistteam/openlist-base-image:${BASE_IMAGE_TAG}
LABEL MAINTAINER="OpenList"
ARG INSTALL_FFMPEG=false
ARG INSTALL_ARIA2=false
ARG USER=openlist
ARG UID=1001
ARG GID=1001
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/
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 adduser -u ${UID} -g ${GID} -h /opt/openlist/data -D -s /bin/sh ${USER} \
&& chown -R ${UID}:${GID} /opt \
&& chown -R ${UID}:${GID} /entrypoint.sh
USER ${USER}
RUN /entrypoint.sh version
ENV 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" ]