Skip to content

Bug: Can't use Docker locally ( RPi ) #1334

Closed

Description

@im-coder-lg

OS Information

  • OS: Raspberry Pi OS 11
  • Browser (if applicable): Chrome
  • Architecture: ARM64 (really)
  • coder --version: 0.5.4 w/ commit hash 4c35b81

Steps to Reproduce

Just make a docker-local template and create a workspace w/ it. It would fail(quite horribly for me, might I add so) and it would be confusing, like a jigsaw puzzle thrown everywhere.

Expected

I am supposed to get a cool Docker image on my 8 GB Pi, which has Docker installed.

Actual

Horrible fail where I don't get anything!

Logs

uno momento

pi@geniuspi:~ $ coder create testerrr
Select a template below to preview the provisioned
infrastructure:

  This template has customizable parameters. Values can be
  changed after create, but may have unintended side effects
  (like data loss).

var.docker_image
  What docker image would you like to use for your workspace?

  >  codercom/enterprise-base:ubuntu

┌──────────────────────────────────────────────────────────────┐
│ Workspace Preview                                            │
├──────────────────────────────────────────────────────────────┤
│ RESOURCE                    STATUS      ACCESS               │
├──────────────────────────────────────────────────────────────┤
│ docker_container.workspace  ephemeral                        │
│ └─ dev (linux, amd64)                    coder ssh testerrr  │
├──────────────────────────────────────────────────────────────┤
│ docker_volume.coder_volume  persistent                       │
└──────────────────────────────────────────────────────────────┘
> Confirm create? (yes/no) y
✔ Queued [158ms]
✔ Setting up [6ms]
⧗  Starting workspace
  Terraform 1.1.7
  coder_agent.dev: Plan to create
  docker_volume.coder_volume: Plan to create
  docker_container.workspace[0]: Plan to create
  Plan: 3 to add, 0 to change, 0 to destroy.
  docker_volume.coder_volume: Creating...
  coder_agent.dev: Creating...
  coder_agent.dev: Creation complete after 0s [id=ba2ca72e-64b8-4107-93b6-955a396df03d]
  docker_volume.coder_volume: Creation complete after 0s [id=coder-developer-testerrr-root]
  docker_container.workspace[0]: Creating...
  docker_container.workspace[0]: Creation errored after 2s
  Error: container exited immediately

✘ Starting workspace [6161ms]
exit status 1

Screenshot

brb

pi@geniuspi_.2022-05-07.15-43-25.mp4

Notes

Anybody has an idea on a proper Docker install for Raspberry Pi?

Activity

  1. im-coder-lg commented on May 7, 2022

    @im-coder-lg
    ContributorAuthor

    BRB

  2. im-coder-lg commented on May 8, 2022

    @im-coder-lg
    ContributorAuthor

    /ping @bpmct any ideas on this?

  3. bpmct commented on May 9, 2022

    @bpmct
    Member

    #1336 may be the issue

    edit: nvm, I see you're running 64 bit raspberry pi OS

  4. im-coder-lg commented on May 9, 2022

    @im-coder-lg
    ContributorAuthor

    Anything else that seems off?

  5. bpmct commented on May 9, 2022

    @bpmct
    Member

    I was able to reproduce this and identify multiple causes. There are some fixes we'll need to do in the product, I took some notes here.

    1. The enterprise-base images are not built for arm64 (you can fix this by editing main.tf, adding compatible images to the validation set, and running coder template update)
    2. Coder is not uploading arm(v7/64) binaries to /bin for the start script to download. This needs to be fixed before the Coder agent starts on a container.

    I was able to run a workspace with a ["/bin/sh", "-ec", "sleep 1000"] start command and a privileged container. However, you cannot SSH in because of problem 2.

  6. im-coder-lg commented on May 9, 2022

    @im-coder-lg
    ContributorAuthor

    So it's all with the architecture of my Pi? Sad I don't have my Linux machine, but who told I can't get a container on Gitpod for testing? I'll do that after an hour, need some me time.

    Moreover, I think it's night for you, so get some sleep. I'll try digging for more info.

  7. mafredri commented on May 9, 2022

    @mafredri
    Member

    @im-coder-lg I was seeing the same issue on amd64 (see #1345). I'm not sure how you're running coder server, but the solution for me was to set the listen address and access URL. Something like this:

    coder server --address 0.0.0.0:3000 --access-url http://172.17.0.1:3000
    

    You may need to replace 172.17.0.1 with some other IP accessible by your container. I have not tested on a Raspberry Pi so this may not help.

  8. added this to the Community MVP milestone on May 16, 2022
  9. tjcran commented on May 16, 2022

    @tjcran

    For now, we should at least address this with documentation for ARM

  10. added
    apiArea: HTTP API
    and removed
    apiArea: HTTP API
    on May 16, 2022
  11. misskniss commented on May 17, 2022

    @misskniss

    @bpmct or @jsjoeio is this something you can take? (by June 10)

  12. bpmct commented on May 17, 2022

    @bpmct
    Member
  13. self-assigned this
    on May 17, 2022
  14. im-coder-lg commented on May 17, 2022

    @im-coder-lg
    ContributorAuthor

    @misskniss is this a real bug? Wait I just got an idea. Why not create an ARM64 image? I mean, use an ARM Ubuntu image from Canonical(debian for armv7l, it is equally competent), customize it with the usual gizmos for the base images used on Docker(Coder's enterprise images) and then get it out on Docker Hub.

  15. bpmct commented on May 17, 2022

    @bpmct
    Member

    @im-coder-lg I opened a PR (#1526) that solves this. You can either:

    1. edit the docker template to include ARM images or
    2. build and run image directly on the Docker host (rpi) using the docker-image-builds template

    Once merged, I think this issue can be resolved. It also adds a warning that the codercom/enterprise-* images do not work on ARM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiArea: HTTP APIdocsArea: coder.com/docs

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions