Screeps Typescript Starter
  • Introduction
  • Getting Started
    • Installation
    • Authenticating with Screeps
    • Deploying
  • In-Depth
    • Module bundling
    • Deploy destinations
    • TypeScript
    • Prettier
    • Testing
    • Cookbook
      • Environment variables
      • One-line PowerShell setup
    • Remote Development
    • Troubleshooting
    • Contributing to the docs
Powered by GitBook
On this page
  • Using a Docker Container
  • Install
  • Open a Project in a Dev Container
  1. In-Depth

Remote Development

PreviousOne-line PowerShell setupNextTroubleshooting

Last updated 4 years ago

It may be the case you don't want to install and maintain multiple versions of Node (10, 12, 14... future releases) in your machine, or you don't want to install npm packages globally.

Keep your Screeps-TypeScript project isolated with its dependencies within a container!

VS Code supports remote development and allows you to use a container as a full-featured development environment. You can open a project mounted into a Docker container to edit with full code completions, code navigation, debugging, and more.

Refer to VS Code documentation if you want to understand more about remote development:

  • Use a as your

  • Switch your development environment by

Using a Docker Container

Follow these instructions for remote development using a Docker Container.

Install

To start remote development in dev container, install:

  • Docker Desktop. For system requirements and installation instructions, see:

    • : Currently Docker desktop for windows supports only Linux Containers and . During the install process, ensure you use the default option of Linux Containers.

  • Latest version of

  • Latest version of . After you install VS Code and Docker - Desktop for your operating system:

    • For Windows, set source code locations you want to open in a container. In Docker, right-click and select Settings / Preferences > Shared Drives / File Sharing. See if you hit trouble with sharing.

    • For Linux, see . From the terminal, run sudo usermod -aG docker $USER to add your user to the docker group. This setting takes effect after you sign out and back in again.

Open a Project in a Dev Container

  1. Open the project you want to work with or create a new project

  2. From the Command Palette, run Remote-Containers: Reopen in Container. If you are unable to see this command, make sure that you have installed the latest version of VS Code Remote Development Extension Pack.

VS Code creates a dev container the first time you open the project. After the dev container is built, the project folder in your local system automatically connects and maps to the container, and the side bar shows Dev Container: Screeps-TypeScript-Starter.

The container pre-installs and configures all Pre-Requisites for this project + other utils for your daily basis:

  • Node 12

  • git

  • ca-certificates

  • openssl

  • openssh

Docker Container
development container
connecting to a container
Windows
not Windows Containers
Mac
Linux
VS Code
VS Code Remote Development Extension Pack
Container tips
supported platforms
remote-container