Skip to content

Unable to access runner machine from within a service container #25982

Answered by arg
arg asked this question in Actions
Discussion options

You must be logged in to vote

I managed to fix the issue by using a proper runner machine IP instead of localhost.

Here is the step I added into workflow:

- name: Set environment variables
  run: |
    echo "::set-env name=APP_IP::$(docker network inspect bridge --format='{{( index .IPAM.Config 0).Gateway}}')"

Then I can point browser to http://${{APP_IP}}:4000.

Thanks @weide-zhou for the hint.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants