try again with inspect bootstrap #25
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
name: Build Image and Test | |
on: | |
push: | |
env: | |
IMAGE_TAG: issue-docker-gha-load-very-slow:${{github.sha}} | |
jobs: | |
ExplicitDockerBuildxCommandWithCache: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Expose GitHub Runtime | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Run Docker image | |
id: docker-run | |
shell: bash | |
run: | | |
docker buildx create \ | |
--name container \ | |
--driver=docker-container \ | |
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host' | |
docker buildx inspect --bootstrap --builder container | |
docker buildx build \ | |
-t ${IMAGE_TAG} \ | |
-f ./Dockerfile . \ | |
--builder=container \ | |
--cache-from=gha \ | |
--cache-to=type=gha,mode=max \ | |
--load | |
docker image ls | |
echo "Running Docker image ${IMAGE_TAG}" | |
docker run --init --rm "${IMAGE_TAG}" | |
docker buildx rm container | |
# dummy1 |