I believe that the 3.0.2-arm64 Docker build is broken. I am running this on a Raspberry Pi4 using 64-bit Ubuntu.
When I try to to run the container, I get the following error:
$ docker run -it codercom/code-server:3.0.2-arm64
/usr/local/bin/fixuid: 2: /usr/local/bin/fixuid: Syntax error: word unexpected (expecting ")")
To check into this a bit further, I built a test Dockerfile based on codercom/code-server:3.0.2-arm64 that is just this:
FROM codercom/code-server:3.0.2-arm64
RUN sudo apt-get update; sudo apt-get install -y file
ENTRYPOINT file /usr/local/bin/fixuid
When I run this container, I get this message:
/usr/local/bin/fixuid: setuid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=2zxEqkKfJJwnveNVKDuQ/1ZwU6fMfvcIshc5qwXRB/xOrQ0MI5H54iHr712aDz/hF8w_99k9vhIr1ncU3Pq, with debug_info, not stripped
This leads me to think that the binary that got loaded into the arm64 Docker container is actually an x86-64 binary. Or am I doing something wrong?
If you rebuild a version of fixuid for arm64 (attached), and slip this into the build, then things work as expected. This is a little difficult because the upstream fixuid doesn鈥檛 automatically build arm64 packages. I manually built this version.
Thanks @mbreese! We'll definitely fix this.
I'll close https://github.com/cdr/code-server/issues/1481 in favour of this.
@code-asher is this fixed in latest?
Negative, we need to build fixuid in the CI for arm64 or perhaps better would be to submit a PR to fixuid so they can have arm64 builds.
Should be really easy: https://github.com/boxboat/fixuid/blob/master/build.sh
Should be really easy: https://github.com/boxboat/fixuid/blob/master/build.sh
A PR for fixuid might not be as easy as you'd think. They hard code amd64 all over their build scripts and expect their filenames to match. Building fixuid in CI would probably be the quickest option... but this is should be do-able.
If this was done on the code-server CI side, would the place to do this be in the ./ci/*image/*.sh files? I don't have enough visibility into your CI system to know if a PR I make on my side would work correctly. For example -- do the CI servers (Travis?) have go installed? If so, then it would be possible to build fixuid in-place as part of the docker build workflow. I'm happy to make the PR, but I'm not sure how I could tell if it would work.
Let's give them a few days to respond.
If not you can go ahead and work on this @mbreese
The travis servers do not have Go but have docker.
You'd want to build fixuid in a docker container in https://github.com/cdr/code-server/blob/8608ae2f08ef1d4cc8ab2bc1d90633b018a4f41b/ci/release-image/push.sh#L16 and inject it into the image and adjust the release image to use it instead of the fixuid binary it fetches from the releases.
I revamped the fixuid CI & release process in https://github.com/boxboat/fixuid/pull/25, if you need any more arch released it should be real easy going forward!
Awesome thanks @caleblloyd
Fixed in latest docker image.
You don't need the extra -arm64 anymore, the latest image is multi arch!
Most helpful comment
I revamped the
fixuidCI & release process in https://github.com/boxboat/fixuid/pull/25, if you need any more arch released it should be real easy going forward!