Replies: 2 comments
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
You could attempt to spin up the service container yourself. The only thing special the Can see this as a workaround: container:
image: node:21-bookworm # Your image here
volumes:
# Mount the path the runner is using to share the socket into the job
- /run/docker/docker.sock:/run/docker/docker.sock
env:
# And tell the steps with Docker CLI usage how to reach the socket
DOCKER_HOST: unix:///run/docker/docker.sock
run: |
# Find the network that starts with the prefix and return its name
NETWORK=$(docker network ls --filter name=github_network_ --format '{{.Name}}')
# Spin up a container in the background and connect it to the job container's network
# Give the service a name so we can find it ... and so the container can later be killed
docker run -d --publish 6379:6379 --name myredis --network $NETWORK redis
# Give it time to spin up. Docker compose has built-in wait support ... and can coordinate a network and multiple containers :-)
sleep 10
# Send a PING to the DNS name "myredis" ... the container.
echo ping | nc -q 1 myredis 6379 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Looks like no-one asked this here, despite it being a sought for feature, for which there seems to have been a PR open for the last 3 years.
Please clarify whether this is considered at all in your planning.
Beta Was this translation helpful? Give feedback.
All reactions