Giter Site home page Giter Site logo

Comments (3)

gbraad avatar gbraad commented on August 16, 2024 2

Simplest solutions are:

  • use/create a specific container image as the base for the server
  • use ssh to connect to the underlying host

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.

from openvscode-server.

minimaxir avatar minimaxir commented on August 16, 2024 1

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 python in the terminal), and the container is actually half the size of gitpod/openvscode-server on disk!

Not entirely sure if this will be convenient for multiple projects, but it's easy enough to tweak, especially since the untarred files cache.

from openvscode-server.

minimaxir avatar minimaxir commented on August 16, 2024

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 avoid the container and use the server directly on the remote host because I need to be able to use it on my iMac/macOS as a host and the only distribution is for Linux, and use ssh to connect to the underlying host is high-friction, especially since I want to be able to use it on my iPad connecting to the iMac via LAN in the browser (and OpenVSCode-server works much better than code-server in this case!)

Therefore, the final option is use/create a specific container image as the base for the server which will probably work the best, although it may require somewhat more clever Dockerfile engineering (e.g. downloading the large server binary as a BUILD image and COPY it to the base image w/ the relevant packages so it's cached and doesn't need to be rebuilt using ADD). I can investigate that.

from openvscode-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.