Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Dockerfile improvements: size, verbosity and style #360

Merged
merged 1 commit into from
May 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ ENV PATH=/root/.local/bin:$PATH

FROM base as developer

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \
ARG DEBIAN_FRONTEND=noninteractive
gilesknap marked this conversation as resolved.
Show resolved Hide resolved
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc python3-dev && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -24,24 +25,23 @@ COPY . .
# install runtime from DIST if there is one

# install runtime from DIST if there is one
RUN mkdir -p /root/.local && \
RUN mkdir -vp /root/.local && \
if [ -d dist ] ; then \
touch requirements.txt && \
pip install --user -r requirements.txt dist/*.whl ; \
pip install --no-cache --user -r requirements.txt dist/*.whl ; \
gilesknap marked this conversation as resolved.
Show resolved Hide resolved
fi

FROM base as runtime

COPY --from=developer /root/.local /root/.local

RUN mkdir -p /root/.config /config \
&& ln -s /config /root/.config/gphotos-sync \
&& mkdir /storage
RUN mkdir -vp /root/.config /config \
&& ln -vs /config /root/.config/gphotos-sync \
&& mkdir -vp /storage

VOLUME /config /storage

ENTRYPOINT ["gphotos-sync"]
CMD ["--version"]

EXPOSE 8080