Last active
August 26, 2018 16:12
-
-
Save wader/fd3fab0705cb75ecc964bc84a661d686 to your computer and use it in GitHub Desktop.
Run command in image, for example list files in docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker build --no-cache https://gist.githubusercontent.com/wader/fd3fab0705cb75ecc964bc84a661d686/raw/ --build-arg IMAGE=alpine --build-arg CMD="find . | cut -c 2- | sort" | |
| ARG IMAGE=alpine | |
| FROM $IMAGE as image | |
| FROM alpine | |
| ARG CMD="find . | cut -c 2- | sort" | |
| COPY --from=image / /image | |
| WORKDIR /image | |
| RUN $CMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment