forked from ajslater/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 799 Bytes
/
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
ARG CODEX_BUILDER_BASE_VERSION
ARG CODEX_BASE_VERSION
FROM ajslater/codex-builder-base:${CODEX_BUILDER_BASE_VERSION} as codex-built
ARG CODEX_WHEEL
LABEL maintainer="AJ Slater <[email protected]>"
WORKDIR /app
# Install codex
COPY ./dist/$CODEX_WHEEL ./dist/$CODEX_WHEEL
# hadolint ignore=DL3059,DL3013
RUN pip3 install --no-cache-dir ./dist/$CODEX_WHEEL
FROM ajslater/codex-base:${CODEX_BASE_VERSION}
ARG PKG_VERSION
LABEL maintainer="AJ Slater <[email protected]>"
LABEL version=$PKG_VERSION
# The final image is the mininimal base with /usr/local copied.
# Possibly could optimize this further to only get python and bin
COPY --from=codex-built /usr/local /usr/local
RUN mkdir -p /comics && touch /comics/DOCKER_UNMOUNTED_VOLUME
VOLUME /comics
VOLUME /config
EXPOSE 9810
CMD ["/usr/local/bin/codex"]