in local, i've set docker to mount the application path. from docker desktop, i set the File Sharing docker desktop > settings > resources > file sharing
so docker can mount my apps. But i cannot find how to do it the same way with github action. So, i just pull my updated code to github below
web:
container_name: oe-web
build:
context: ./
dockerfile: Dockerfile
depends_on:
- db
ports:
- 8000:8000
working_dir: /app
volumes:
- ./:/app
workflow
name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker-compose
run: docker-compose up -d
- name: Sleep for 20s
uses: juliangruber/sleep-action@v1
with:
time: 10s
- name: database migration with docker
run: docker exec oe-web php artisan migrate
- name: database seed with docker
run: docker exec oe-web php artisan db:seed
and the github action return error when trying to build the docker
Run docker exec oe-web php artisan migrate
Error response from daemon: Container 27479cda84fb7f7c393bceeedbb2e2cf5ecd086917390728ac635748ac4411df is not running
Error: Process completed with exit code 1.
you can visit my pull request here: https://github.com/dhanyn10/open-ecommerce/pull/189
[UPDATED] error log
1s
Run chmod -R 777 ./
chmod -R 777 ./
docker-compose ps
docker-compose logs
shell: /usr/bin/bash -e {0}
Name Command State Ports
-------------------------------------------------------------------------------------------------
oe-adminer entrypoint.sh php -S [::]: ... Up 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp
oe-db docker-entrypoint.sh --def ... Up 3306/tcp, 33060/tcp
oe-web docker-php-entrypoint /bin ... Exit 255