-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
What is the correct way to deploy the code-server on alpine? #6535
Comments
Ah I think we are missing the krb5 dependency in our Alpine instructions. Maybe try installing |
I have followed the above steps. When I type code-server on the command line, the message says the server is at http://127.0.0.1:8080, but I can't pull anything up in the browser. I am attaching pictures. Anything else I can check? |
Ah you probably need to bind to |
Thanks. As you suggested, I changed 127.0.0.1 to 0.0.0.0 in the config.yaml file. I restarted the container and now it works. |
Closing for now since there are no action items for code-server. Tracking for potentially adding an official Alpine release is here: #3431 |
@code-asher Do you have a working alpine |
No, I do not, but I tried building code-server on Alpine just now and these commands worked:
It would also normally be possible to package it with |
Thanks to @code-asher, for the information if you need to deploy code-server into an alpine container, you can use the following Dockerfile : FROM node:20-alpine AS code-builder
RUN apk update && \
apk upgrade
RUN apk add bash git alpine-sdk quilt krb5-dev libx11-dev \
libxkbfile-dev libstdc++ libc6-compat libsecret-dev jq rsync
RUN git clone --recurse-submodules --shallow-submodules \
--depth 1 https://github.com/coder/code-server.git \
/code-server
RUN cd /code-server && quilt push -a
RUN cd /code-server && npm install
RUN cd /code-server && npm run build
RUN cd /code-server && VERSION='0.0.0' npm run build:vscode
RUN cd /code-server && npm run release
RUN cd /code-server && npm run release:standalone
FROM alpine:latest
RUN apk update && \
apk upgrade
RUN apk add libstdc++
COPY --from=code-builder /code-server/release-standalone /opt/code-server
CMD ["/opt/code-server/bin/code-server","--host","0.0.0.0"] Be ready because the VS Code build is around ~30 minutes with 6 CPU and 12 gigabytes of RAM. |
Is there an existing issue for this?
OS/Web Information
alpine3.18.4 in docker container
Steps to Reproduce
I try to step by step with the offical docs.
docker run --ti alpine:3.18.4
apk update && apk add alpine-sdk bash libstdc++ libc6-compat
apk add python3
apk add nodejs=18.18.2-r0
apk add npm
npm config set python python3
, this command will error, then I try it thenpm config edit
and add the 'python=python3` in the open fileexport FORCE_NODE_VERSION=18
npm install --global code-server --unsafe-perm
Expected
success deploy the code-server
Actual
Print a log of error at the last step.
I see the err tips:"You may not have the required dependencies to build the native modules", then I try to see the lists Node.js requirements and confirm the prerequisites, but also not success.
Logs
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
Are you accessing code-server over a secure context?
Notes
So, what the correct way to deploy the code-server on alpine? Or is it not support the alpine in docker?
The text was updated successfully, but these errors were encountered: