Skip to content

Commit

Permalink
fixup!chore(github-action): build cnb image - cannot use link as not …
Browse files Browse the repository at this point in the history
…on default network
  • Loading branch information
o-orand committed Sep 26, 2024
1 parent 4f45cf7 commit 73014eb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-using-cnb-buildpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ jobs:
cat vcap-service.env
docker ps -a
redis_container_name="$(docker ps -f "ancestor=$SERVICE_IMAGE" --format "{{.Names}}")"
echo "Starting sample app (linked with $redis_container_name)"
container_id=$(docker run -d --link $redis_container_name -e PORT=8080 --env-file vcap-service.env --name "cnb-app-container" ${{env.CNB_IMAGE_NAME}})
docker inspect $redis_container_name
echo "Starting sample app"
# container_id=$(docker run -d --link $redis_container_name -e PORT=8080 --env-file vcap-service.env --name "cnb-app-container" ${{env.CNB_IMAGE_NAME}})
container_id=$(docker run -d -e PORT=8080 --env-file vcap-service.env --name "cnb-app-container" ${{env.CNB_IMAGE_NAME}})
echo "Cnb app started (id: $container_id)"
#docker inspect -f '{{.HostConfig.LogConfig.Type}}' $container_id
# docker run -e PORT=80 --env-file vcap-service.env -p 8080:80 --name "cnb-app-container" ${{env.CNB_IMAGE_NAME}}
docker logs -f cnb-app-container &> cnb-app-container.log &
docker ps -a
env|sort
# env|sort
export APP="http://127.0.0.1:8080"
exit_status=0
if nc -vz 127.0.0.1 8080;then echo "port 8080 available";else echo "port 8080 UNAVAILABLE";exit_status=1;fi
Expand Down

0 comments on commit 73014eb

Please sign in to comment.