Skip to content

building docker and running in the same job env #43

building docker and running in the same job env

building docker and running in the same job env #43

Workflow file for this run

name: Docker Image CI
on:
push:
paths:
- '.github/workflows/docker-image.yml'
# branches:
# - "develop"
jobs:
built:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build --tag ai4eu_server_demo:latest -f Dockerfile .
- name: Run docker container
run: |
docker network create sql-network
docker run -e MYSQL_ROOT_PASSWORD=ok --name sqlserver --network sql-network -d mysql
docker run --network sql-network -it --rm -p 8000:8000 --name apiserver ai4eu_server_demo
pip install pre-commit