# Running Docker Images without GitHub CI Hanging

**URL:** <https://forums.docker.com/t/running-docker-images-without-github-ci-hanging/116820>\
**Category:** Docker Hub\
**Tags:** ci\_cd\
**Created:** [October 25, 2021, 5:39pm UTC](https://forums.docker.com/t/running-docker-images-without-github-ci-hanging/116820 "2021-10-25T17:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spaceturtle0](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/spaceturtle0/32/31651_2.png) [@spaceturtle0](https://forums.docker.com/u/spaceturtle0)\
**Post date:** [October 25, 2021, 5:39pm UTC](https://forums.docker.com/t/running-docker-images-without-github-ci-hanging/116820/1 "2021-10-25T17:39:00Z")

</div>

I’m trying to use GitHub Actions to run a docker image though the last command doesn’t actually finish up if that makes sense. The Docker Image does run although, despite the `&` and `nohup`, the specific step is marked as running forever until the docker image is stopped or killed. Is there an alternative command (`nohup docker run --env-file=Timmy-SchoolSimplified/.env timmy &`) that doesn’t “hang” and immediately moves on?

This is my current workflow:

```yml
name: SSH & Deploy Image
on:
  workflow_run:
    workflows: ["Timmy Docker Build"]
    branches: [main]
    types:
      - completed

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - name: Run Docker CMD
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        username: ${{ secrets.USERNAME }}
        password: ${{ secrets.PASSWORD }}
        port: ${{ secrets.PORT }}
        script: |
          docker rm $(docker stop $(docker ps -a -q --filter ancestor=timmy --format="{{.ID}}"))
          docker pull spaceturtle0/ss-timmy:latest
          docker tag spaceturtle0/ss-timmy timmy
          nohup docker run --env-file=Timmy-SchoolSimplified/.env timmy &

```

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [October 25, 2021, 8:50pm UTC](https://forums.docker.com/t/running-docker-images-without-github-ci-hanging/116820/2 "2021-10-25T20:50:38Z")

</div>

Sorry, it could be a stupid question since I don’t use GitHub CI, but is there any reason you don’t use “-d” with docker run to run the process in the background instead of relying on the job control in bash with nohup and `&`? Will GitHub CI somehow use nohop.out file to show you some status information?
