Created
May 18, 2020 17:28
-
-
Save maiamcc/1b6ff55c32d746fa2a928978f8492198 to your computer and use it in GitHub Desktop.
custom build dependent images
This file contains 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
FROM parent | |
RUN ["echo", "the file says:"] | |
RUN ["cat", "/thedate"] |
This file contains 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
FROM alpine | |
ADD thedate / | |
ENTRYPOINT ["sleep", "1000000"] |
This file contains 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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mypod | |
labels: | |
name: mypod | |
spec: | |
containers: | |
- name: mypod | |
image: child | |
ports: | |
- containerPort: 80 |
This file contains 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
k8s_yaml('k8s.yaml') | |
custom_build( | |
'parent', | |
'docker build -f Dockerfile.parent -t $EXPECTED_REF .', | |
['.'], | |
) | |
custom_build( | |
'child', | |
'docker build -f Dockerfile.child -t $EXPECTED_REF .', | |
['.'], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment