-
Docker mode running on my personal iMac with the provided CLI arguments works great for running VS Code in the browser. However, it's unclear what the best practices are for running code written with VS Code locally, as all Terminal commands would be run in the sparse Docker container itself (in contrast to the chonky default container included with Codespaces). What's the best way to work around this? Is there something similar to a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Simplest solutions are:
Or avoid the container and use the server directly on the remote host. Note: this is not a replacement for codespaces, but merely the server component as used by them. Any infrastructure or deployment is not part of this repo. |
Beta Was this translation helpful? Give feedback.
-
Although infra may not explicitly be a part of this repo, I suspect locally hosting the server but accessing it remotely will be a common use case (for example, a Hacker News user asked "with docker, how would you install eg. node and go binaries?"). Since this repo has guides for Cloud deployment, there should also be guides for local deployment. In my case, I can't Therefore, the final option is |
Beta Was this translation helpful? Give feedback.
-
So here's a Dockerfile for running basic Python, and using the Linux binary. FROM busybox AS build-env
ENV OPENVSCODE_SERVER_VERSION 1.60.2
ADD https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${OPENVSCODE_SERVER_VERSION}/openvscode-server-v${OPENVSCODE_SERVER_VERSION}-linux-x64.tar.gz /tmp
RUN cd /tmp/ && \
tar -xzf openvscode-server-v${OPENVSCODE_SERVER_VERSION}-linux-x64.tar.gz && \
mv openvscode-server-v${OPENVSCODE_SERVER_VERSION}-linux-x64 vscode && \
rm openvscode-server-v${OPENVSCODE_SERVER_VERSION}-linux-x64.tar.gz
### CUSTOM CONTAINER SPECS HERE
FROM python:3-slim
### CUSTOM CONTAINER SPECS HERE
COPY --from=build-env /tmp/ /
WORKDIR /vscode
ENTRYPOINT ["./server.sh"] Seems to work (you can run Not entirely sure if this will be convenient for multiple projects, but it's easy enough to tweak, especially since the untarred files cache. |
Beta Was this translation helpful? Give feedback.
Simplest solutions are:
Or avoid the container and use the server directly on the remote host.
Note: this is not a replacement for codespaces, but merely the server component as used by them. Any infrastructure or deployment is not part of this repo.