Last active
April 23, 2018 22:53
-
-
Save lox/a0dbe5868556e470afd6697b34eb37c4 to your computer and use it in GitHub Desktop.
Test caching shared base image in docker-compose-buildkite-plugin
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
version: '3.4' | |
services: | |
base_service: | |
build: . | |
service1: | |
build: . | |
service2: | |
build: . |
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
FROM alpine:3.3 | |
RUN echo "CACHE MISS" && sleep 10 | |
RUN apk update && \ | |
apk add --no-cache openssl && \ | |
rm -rf /var/cache/apk/* | |
RUN echo "CACHE MISS" && sleep 10 | |
RUN openssl req -x509 -nodes -newkey rsa:4096 -keyout /key.pem -out /certificate.pem -days 720 -subj "/C=US/ST=State/L=City/O=Department/OU=Company/CN=localhost.localdomain" | |
RUN echo "CACHE MISS" && sleep 10 |
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
steps: | |
- name: ':docker: :package:' | |
plugins: | |
'docker-compose#aa08b09': | |
build: base_service | |
image-repository: lox24/test-docker-compose-plugin | |
- wait | |
- name: 'task 1' | |
command: cat /certificate.pem | |
plugins: | |
'docker-compose#aa08b09': | |
run: service1 | |
cache_from: base_service | |
- name: 'task 2' | |
command: cat /certificate.pem | |
plugins: | |
'docker-compose#aa08b09': | |
run: service2 | |
cache_from: base_service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment