Skip to content

Commit

Permalink
speed up docker (re-)build by caching pip cache
Browse files Browse the repository at this point in the history
Signed-off-by: g2flyer <[email protected]>
  • Loading branch information
g2flyer committed Jan 26, 2024
1 parent 1204450 commit da1300b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docker/pdo_ccf.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

# syntax = docker/dockerfile:experimental

ARG PDO_VERSION
FROM pdo_ccf_base:${PDO_VERSION}

Expand Down Expand Up @@ -44,7 +46,9 @@ WORKDIR /project/pdo/tools
COPY --chown=${UNAME}:${UNAME} tools/*.sh ./

# build it!!!
RUN /project/pdo/tools/build_ccf.sh
ARG UID=1000
ARG GID=${UID}
RUN --mount=type=cache,uid=${UID},gid=${GID},target=/project/pdo/.cache/pip /project/pdo/tools/build_ccf.sh

# Network ports for running services
EXPOSE 6600
Expand Down
6 changes: 5 additions & 1 deletion docker/pdo_client.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

# syntax = docker/dockerfile:experimental

ARG PDO_VERSION
FROM pdo_base:${PDO_VERSION}

Expand Down Expand Up @@ -63,7 +65,9 @@ WORKDIR /project/pdo/tools
COPY --chown=${UNAME}:${UNAME} tools/*.sh ./

# build it!!!
RUN /project/pdo/tools/build_client.sh
ARG UID=1000
ARG GID=${UID}
RUN --mount=type=cache,uid=${UID},gid=${GID},target=/project/pdo/.cache/pip /project/pdo/tools/build_client.sh

ARG PDO_HOSTNAME
ENV PDO_HOSTNAME=$PDO_HOSTNAME
Expand Down
6 changes: 5 additions & 1 deletion docker/pdo_services.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

# syntax = docker/dockerfile:experimental

ARG PDO_VERSION
FROM pdo_services_base:${PDO_VERSION}

Expand Down Expand Up @@ -48,7 +50,9 @@ WORKDIR /project/pdo/tools
COPY --chown=${UNAME}:${UNAME} tools/*.sh ./

# built it!
RUN /project/pdo/tools/build_services.sh
ARG UID=1000
ARG GID=${UID}
RUN --mount=type=cache,uid=${UID},gid=${GID},target=/project/pdo/.cache/pip /project/pdo/tools/build_services.sh

# Network ports for running services
EXPOSE 7001 7002 7003 7004 7005
Expand Down

0 comments on commit da1300b

Please sign in to comment.