Skip to content

Commit

Permalink
Merge pull request #5 from syroegkin/dev
Browse files Browse the repository at this point in the history
fix(docker): fix docker image build script
  • Loading branch information
syroegkin authored Oct 28, 2024
2 parents e9d1067 + 973d827 commit e994dd5
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,21 @@ jobs:
command: npx semantic-release

build_image:
<<: *node_defaults
docker:
- image: docker:17.05.0-ce-git
- image: cimg/base:current-22.04
steps:
- checkout
- run:
name: Get the recent changes
command: git pull origin master
- setup_remote_docker:
version: 19.03.13
- run:
name: Install dependencies
command: apk add --no-cache jq
- restore_cache:
keys:
- v1-{{ .Branch }}
paths:
- /caches/app.tar
- run:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i /caches/app.tar | true
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build application Docker image
command: |
docker build --cache-from=app -t app -f Dockerfile .
- run:
name: Save Docker image layer cache
command: |
mkdir -p /caches
docker save -o /caches/app.tar app
docker build -t app -f Dockerfile .
- deploy:
name: Push application Docker image
name: Push Docker images
command: |
docker login ghcr.io -u syroegkin -p${GITHUB_TOKEN}
docker tag app "ghcr.io/syroegkin/$(jq -r '.name' package.json):$(jq -r '.version' package.json)"
Expand Down

0 comments on commit e994dd5

Please sign in to comment.