Skip to content

Instantly share code, notes, and snippets.

@maiamcc
Created May 18, 2020 17:28
Show Gist options
  • Save maiamcc/5708d39c7cfa63abb1a2d73d06be0315 to your computer and use it in GitHub Desktop.
Save maiamcc/5708d39c7cfa63abb1a2d73d06be0315 to your computer and use it in GitHub Desktop.
custom build dependent images
FROM parent
RUN ["echo", "the file says:"]
RUN ["cat", "/thedate"]
FROM alpine
ADD thedate /
ENTRYPOINT ["sleep", "1000000"]
apiVersion: v1
kind: Pod
metadata:
name: mypod
labels:
name: mypod
spec:
containers:
- name: mypod
image: child
ports:
- containerPort: 80
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