# Deployments Hanging with Docker on Github Actions

**URL:** <https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527>\
**Category:** Questions / Help\
**Created:** [March 29, 2022, 1:55am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527 "2022-03-29T01:55:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![finntechnz](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/finntechnz/32/2943_2.png) [@finntechnz](https://community.fly.io/u/finntechnz)\
**Post date:** [March 29, 2022, 1:55am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/1 "2022-03-29T01:55:20Z")

</div>

Hey team

We’ve had some great success moving one of our Node+React apps into Docker and onto [Fly.io](http://Fly.io) in the last couple of weeks. We’re building the images using the Fly Github action.

Yesterday, we tried moving a second of our Node+React apps onto Fly using a matching Dockerfile and config, and now both apps are having issues hanging during deployment.

We’re seeing this repeatedly in Github actions and are able to replicate it locally using [act](https://github.com/nektos/act). Including some logs below, but it seems to hang after `Building image with Docker` - we’ve let it run for several hours on Github actions without it progressing past this step. Again, until this week we have been able to deploy successfully from Github Actions and we haven’t changed our config/scripts.

```auto
Run superfly/flyctl-actions@1.3
  with:
    args: deploy -c fly.staging.toml -r syd --build-arg ADDRESS_API_KEY=" ***" --build-arg ADDRESS_API_URL="***" --build-arg ADYEN_CLIENT_ENV=" ***" --build-arg ADYEN_CLIENT_KEY="***" --build-arg BASE_ASSET_URL=" ***" --build-arg CLIENT_API_URL="***" --build-arg MAPBOX_ACCESS_TOKEN=" ***" --build-arg ROLLBAR_ACCESS_TOKEN="***" --build-arg ROLLBAR_ENV="***"
  
  env:
    FLY_API_TOKEN: ***
/usr/bin/docker run --name a9e2ad96996b611450296c6998d959c657f_753543 --label 372a9e --workdir /github/workspace --rm -e FLY_API_TOKEN -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/hom...
==> Verifying app config
--> Verified app config
==> Building image
Waiting for remote builder fly-builder-polished-voice-5162...
Remote builder fly-builder-polished-voice-5162 ready
==> Creating build context
--> Creating build context done
==> Calculating build context size...
--> Finished calculating build context size.
Your build context is 2.2 MB
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64

```

And it doesn’t make it any further. Results are the same if we include the `--remote-only` flag on the build. Let me know any suggestions or any other info I can provide!

Cheers

---

<div class="post-metadata">

**Author:** ![michael](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/michael/32/16_2.png) [@michael](https://community.fly.io/u/michael)\
**Post date:** [March 29, 2022, 2:55am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/2 "2022-03-29T02:55:00Z")

</div>

Can you try again with the previous flyctl release?

```auto
- uses: superfly/flyctl-actions/setup-flyctl@master
  with:
    version: 0.0.308

```

---

<div class="post-metadata">

**Author:** ![finntechnz](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/finntechnz/32/2943_2.png) [@finntechnz](https://community.fly.io/u/finntechnz)\
**Post date:** [March 29, 2022, 3:49am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/3 "2022-03-29T03:49:51Z")

</div>

Thanks Michael, that’s worked nicely.

FYI we were using `superfly/flyctl-actions@1.3` so I had to break out a second step in our Github Worklow. Including full change for context and if anyone else comes across this in future.

Previous Github action:

```auto
steps:
  - uses: actions/checkout@v2
  - uses: superfly/flyctl-actions@1.3
    with:
      args: >
        deploy
        -c fly.staging.toml
        -r syd
        --build-arg <BUILD ARGS OMITTED>

```

New, working Github action:

```auto
steps:
  - uses: actions/checkout@v2
  - uses: superfly/flyctl-actions/setup-flyctl@master
    with:
      version: 0.0.308
  - run: >
      flyctl
      deploy
      -c fly.staging.toml
      -r syd
      --build-arg <BUILD ARGS OMITTED>

```

Can we expect a fixed version of the `flyctl-actions` action we were previously using at some point?

---

<div class="post-metadata">

**Author:** ![jsierles](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jsierles/32/595_2.png) [@jsierles](https://community.fly.io/u/jsierles)\
**Post date:** [March 29, 2022, 12:52pm UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/4 "2022-03-29T12:52:30Z")

</div>

This was fixed in release [0.0.310](https://github.com/superfly/flyctl/releases/tag/v0.0.310). You can use the old action style, but we recommend using `setup-flyctl`. It will generally be faster than the other one, which uses Docker to run commands.

---

<div class="post-metadata">

**Author:** ![finntechnz](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/finntechnz/32/2943_2.png) [@finntechnz](https://community.fly.io/u/finntechnz)\
**Post date:** [April 4, 2022, 5:05am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/5 "2022-04-04T05:05:35Z")

</div>

Thanks, Joshua - we are actually seeing the opposite on our project (Node + React), the deployment using `superfly/flyctl-actions` was taking around 3 minutes, and the new runs using `superfly/flyctl-actions/setup-flyctl` are taking 9-10 minutes.

Any ideas on what we should look at to speed this up? The steps in our Github actions (both old and new) are as I indicated in my previous reply.

Cheers

---

<div class="post-metadata">

**Author:** ![jsierles](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jsierles/32/595_2.png) [@jsierles](https://community.fly.io/u/jsierles)\
**Post date:** [April 4, 2022, 10:15am UTC](https://community.fly.io/t/deployments-hanging-with-docker-on-github-actions/4527/6 "2022-04-04T10:15:53Z")

</div>

Can you post the output of the two commands?

Is it possible that one is building with local Docker, and the other using a remote builder? It would be easier to compare if both explicitly use `--remote-only`. Builds using the local Github docker will be slower if you don’t have layer caching setup. And it’s not set up by default on Github Actions.
