Skip to content

ci: build Docker image on GHA #5

ci: build Docker image on GHA

ci: build Docker image on GHA #5

Workflow file for this run

name: Build Dockerfile
on: push
jobs:
build:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v3
- name: Build Dockerfile
run: docker build . -t plotly
- name: Run Docker image
run: |
CONTAINER_ID=$(docker run --rm -d -p 3000:3000 --net=host plotly)
while ! netstat -tna | grep LISTEN | grep --silent 3000
do
echo Waiting for Node.js server to start ...
sleep 5
done
netstat -tulpen
docker logs "$CONTAINER_ID"
curl -X POST -i 127.0.0.1:3000/ --data '{ "x": ["2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00"], "y": [1, 3, 6], "type": "scatter" }'
docker stop -t 1 "$CONTAINER_ID"