This guide provides step-by-step instructions to deploy Theia IDE in a Docker container. The setup involves two main stages:
- Pre-building Theia with a Docker image (Dockerfile.build) and extracting the build files.
- Creating a new Docker image that contains the pre-built files, clones a Git repository, and runs Theia.
Make sure you have the following installed on your machine:
- Docker
- Git
docker build -t theia-build -f Dockerfile.build .
Create a temporary container from the build image and copy the files to the local machine:
docker create --name theia-temp theia-build
docker cp theia-temp:/home/theia ./built
docker rm -v theia-temp
docker build -t theia-app .
You can now run a container from the theia-app image:
docker run -it -e GIT_REPO_URL=https://github.com/your-username/your-repo.git -p 3000:3000 theia-app
Replace the GIT_REPO_URL environment variable with your Git repository URL.
You can now access Theia IDE at http://localhost:3000.