i have project to automating deploy my docker when new commit in github. I have been running docker in mac, and this my error i got :
Run docker build . --file Dockerfile --flask-webyogixyz2345
docker build . --file Dockerfile --flask-webyogixyz2345
shell: /bin/zsh {0}
/Users/runner/work/_temp/acce643b-8828-43ba-94ea-b7c7b4c8f4ab:1: command not found: docker
Error: Process completed with exit code 127.
and this my script in github actions
name: Docker Image CI
on:
push:
branches: [ "new-feature" ]
pull_request:
branches: [ "new-feature" ]
defaults:
run:
shell: zsh {0}
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --flask-webyogixyz2345
can someone help me to solve this error ? thank youuu
no error in my github actions
As stated in different discussions on the Github Community: Source 1 + Source 2
Unfortunately, the docker community licensing is such that we are not able to install the docker for mac on our hosted runners. We have had some discussions with Docker about doing this but they have held firm on their request that using Docker on a service requires an enterprise license and docker enterprise is not at all supported on macOS.
Note that for Windows, Microsoft holds the license for Docker Enterprise on Windows so we do not have any issues there and for Linux we use a specific build of Docker for Linux that is built and maintained by Azure.
Fortunately, as explained in this issue, Colima (a container runtimes on macOS) has been added to the macos runner image.
Which allows you to use docker commands, as below, on a macos runner:
jobs:
job:
runs-on: macos-latest
steps:
- run: |
brew install docker
colima start
docker run -e [...]
More informations and workarounds can be found here