mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 15:27:49 +01:00
ok now it should cache
This commit is contained in:
@@ -92,7 +92,6 @@ jobs:
|
||||
build:
|
||||
machine:
|
||||
image: ubuntu-2004:current
|
||||
docker_layer_caching: true
|
||||
working_directory: ~/photos
|
||||
resource_class: large
|
||||
|
||||
@@ -108,12 +107,26 @@ jobs:
|
||||
|
||||
- run:
|
||||
name: create docker builder
|
||||
command: docker buildx create --use
|
||||
command: docker buildx create --use --driver=docker-container
|
||||
|
||||
- restore_cache:
|
||||
keys:
|
||||
- buildx-photos-circleci
|
||||
|
||||
- run:
|
||||
name: build and push to docker hub
|
||||
command: docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
|
||||
#command: docker buildx build --push --platform linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
|
||||
command: |
|
||||
docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH \
|
||||
--cache-to=type=local,mode=max,dest=/tmp/dockercache \
|
||||
--cache-from=type=local,src=/tmp/dockercache .
|
||||
- run:
|
||||
name: prune cache
|
||||
command: docker buildx prune --keep-storage=2gb --verbose
|
||||
|
||||
- save_cache:
|
||||
key: buildx-photos-circleci
|
||||
paths:
|
||||
- /tmp/dockercache
|
||||
|
||||
# build-arm:
|
||||
# machine:
|
||||
|
||||
Reference in New Issue
Block a user