code-server-docker
is VS Code compiled by the team at cdr and running terraform on a remote server, accessible through the browser. The shell scripts called in the DockerFile pulls down the current versions of Terraform and AWSCLI then installs them on top of the code-server
base image.
should operate as the following:
docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" cush/code-server
A docker compose example for the base image can be found here. Below is a version similar to my own which shows how one would run this container in the context of using a reverse proxy and facing the internet.
---
version: "2"
services:
vscode:
image: cush/code-server:latest
container_name: vscode
restart: unless-stopped
networks:
- dockernet
environment:
- PUID=1000
- GUID=1000
- PASSWORD=${PASSWORD}
volumes:
- /mnt/configmount/vscode:/home
- /home/vagrant/.ssh/:/home/coder/.ssh/ #avoid potential ssh key permission issues if using Windows storage and remote git repositories
labels:
- "traefik.enable=true"
- "traefik.backend=vscode"
- "traefik.frontend.rule=Host:code.cushenberry.com"
- "traefik.port=8080"
- "traefik.docker.network=dockernet"