launchrctl / launchr

Launchr is a CLI action runner that executes actions inside short-lived local containers.
Apache License 2.0
10 stars 2 forks source link

Option to build docker image without using cache #9

Closed davidferlay closed 6 months ago

davidferlay commented 9 months ago

Observed

When executing an action which uses a Dockerfile, the image gets built using cache, which has the disadvantage of hidding the output of building steps :

$ plasmactl platform:compare-artifact ${ARTIFACTS_REPOSITORY_USERNAME} ${GET_PLASMACTL_BINARY_PASSWORD} -vvv
DEBUG: Starting execution of the action "platform:compare-artifact" in "docker" environment, command [sleep infinity]
Image "platform-actions-compare-artifact:latest" doesn't exist locally, building...
INFO: Image "platform-actions-compare-artifact:latest" doesn't exist locally, building...
Step 1/15 : FROM alpine:3.18
 ---> 8ca4688f4f35
Step 2/15 : WORKDIR /host
 ---> Using cache
 ---> ec8f1dcc3c82
Step 3/15 : ARG USER_ID
 ---> Using cache
 ---> 78431d130670
Step 4/15 : ARG GROUP_ID
 ---> Using cache
 ---> ec65d6738ec9
Step 5/15 : RUN echo ${USER_ID}
 ---> Using cache
 ---> bfcc50d83b52
Step 6/15 : RUN echo ${GROUP_ID}
 ---> Using cache
 ---> 664724453776
Step 7/15 : RUN cat /etc/os-release
 ---> Using cache
 ---> fd5c52956a54
Step 8/15 : COPY resolve.conf /etc/resolve.conf
 ---> Using cache
 ---> da252fa7cf5a
Step 9/15 : RUN cat /etc/resolve.conf
 ---> Using cache
 ---> b30cf5e85f08

Expected

davidferlay commented 6 months ago

Closing in favor of https://github.com/launchrctl/launchr/issues/8