Skip to content

Go code, and nushell do not work in an alpine linux container I've created #158

@godalming123

Description

@godalming123

Firstly, thanks for creating the most complete developer environment I've found that runs fully in the web browser.

I've created a quite modified docker container that adds the go programming language, the helix text editor, nu shell, and the lf terminal file explorer to the environment. The code is here, and the live environment is here. My image also uses alpine linux instead of debian since alpine has more and newer packages (helix does not exist in the debain repos, nushell does not exist in the debian repos, and go has an older version in debain repos). 2nd note: I'm happy to break these into separate issues if you want.

Below is a list of issues that I'm having in order of importance. Note that everything below seems to work fine when I run the docker container locally with the command sudo docker build . --file dockerfiles/debian_mini --tag "debian_mini"; sudo docker run -it debian_mini.

Go, gopls (the language server for go), and lf do not work

All of these programs fail with the same error:

 runtime: panic before malloc heap initialized

 runtime stack:
 runtime.throw({0x8733ba3, 0x1e})
         runtime/panic.go:1067 +0x35 fp=0xc00ffdc4 sp=0xc00ffdb0 pc=0x80bc5b5
 runtime.mallocinit()
         runtime/malloc.go:387 +0x476 fp=0xc00ffdf0 sp=0xc00ffdc4 pc=0x8056c46
 runtime.schedinit()
         runtime/proc.go:818 +0xe6 fp=0xc00ffe30 sp=0xc00ffdf0 pc=0x80863a6
 runtime.rt0_go()
         runtime/asm_386.s:243 +0x161 fp=0xc00ffe34 sp=0xc00ffe30 pc=0x80c1d01

I think that this is caused by part of the go startup code, since all of these tools are at least partially written in go.

Nushell does not start

When I try to start nushell with the nu command, after being prompted about wether I should create the default configs in my config directory, I get the error written repeated forever in the console:

Error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }

Things that don't affect me

These things don't affect me, although they still seem to be inconsistencies between how the container works when it is ran with webvm compared to when it is ran with docker.

USER root

Adding USER root in the dockerfile changes the user of the startup shell to root in docker, but doesn't appear to do anything in webvm (whoami still outputs user).

Doas

Setting up doas, and running doas sh in the container allows an unprivileged shell to get superuser privileges in docker, but creates the following error in webvm:

doas: Operation not permitted

Sudo

Setting up sudo and running sudo sh in the container allows an unprivileged shell to get superuser privileges in docker, but in webvm, it just asks for the user password, and then creates the following error:

sudo: error in event loop: Function not implemented
sudo: unexpected child termination condition: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions