Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
im-coder-lg opened this issue May 7, 2022 · 12 comments
Closed

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

im-coder-lg opened this issue May 7, 2022 · 12 comments
Assignees
Labels
api Area: HTTP API docs Area: coder.com/docs
Milestone

Comments

@im-coder-lg
Copy link
Contributor

im-coder-lg commented May 7, 2022

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?

@im-coder-lg
Copy link
Contributor Author

BRB

@im-coder-lg
Copy link
Contributor Author

/ping @bpmct any ideas on this?

@bpmct
Copy link
Member

bpmct commented May 9, 2022

#1336 may be the issue

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

@im-coder-lg
Copy link
Contributor Author

Anything else that seems off?

@bpmct
Copy link
Member

bpmct commented May 9, 2022

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.

@im-coder-lg
Copy link
Contributor Author

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.

@mafredri
Copy link
Member

mafredri commented May 9, 2022

@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.

@tjcran tjcran added docs Area: coder.com/docs and removed needs grooming 🪒 labels May 16, 2022
@tjcran tjcran added this to the Community MVP milestone May 16, 2022
@tjcran
Copy link

tjcran commented May 16, 2022

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

@coadler coadler added api Area: HTTP API and removed api Area: HTTP API labels May 16, 2022
@misskniss misskniss added the api Area: HTTP API label May 17, 2022
@misskniss
Copy link

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

@bpmct
Copy link
Member

bpmct commented May 17, 2022

@misskniss yep!

@bpmct bpmct self-assigned this May 17, 2022
@im-coder-lg
Copy link
Contributor Author

@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.

@bpmct
Copy link
Member

bpmct commented May 17, 2022

@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
Labels
api Area: HTTP API docs Area: coder.com/docs
Projects
None yet
Development

No branches or pull requests

6 participants