diff --git a/docs/settings/README.md b/docs/settings/README.md index 7fee4d58ca..248853c47c 100644 --- a/docs/settings/README.md +++ b/docs/settings/README.md @@ -6,3 +6,6 @@ The subdirectories here contain settings files for VSCode that might be helpful Create a `.vscode` subdirectory in the root `keyman` source directory (i.e. in `../..`) and copy the relevant settings files there. + +Copy the `.devcontainer` directory to the root `keyman` source directory if you +want to use the VSCode [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). diff --git a/docs/settings/linux/.devcontainer/Dockerfile b/docs/settings/linux/.devcontainer/Dockerfile new file mode 100644 index 0000000000..a90dced566 --- /dev/null +++ b/docs/settings/linux/.devcontainer/Dockerfile @@ -0,0 +1,19 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile + +# VARIANT: Ubuntu version: ubuntu-22.04, jammy, ubuntu-20.04, focal, ubuntu-18.04, bionic +# Note: on local arm64/Apple Silicon use ubuntu-22.04 or ubuntu-18.04 +ARG VARIANT="jammy" +FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} + +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get -y install --no-install-recommends software-properties-common \ + cdbs debhelper libx11-dev autotools-dev build-essential \ + dh-autoreconf flex bison libibus-1.0-dev python3-setuptools meson \ + libjson-glib-dev libgtk-3-dev libxml2-utils help2man python3-lxml \ + python3-magic python3-numpy python3-pil python3-pip python3-qrcode \ + python3-requests python3-requests-cache python3 python3-gi dconf-cli \ + dconf-editor cargo python3-dbus gir1.2-webkit2-4.0 ibus libglib2.0-bin \ + liblocale-gettext-perl xvfb xserver-xephyr metacity mutter \ + && sudo add-apt-repository --yes ppa:keymanapp/keyman \ + && sudo apt upgrade --yes diff --git a/docs/settings/linux/.devcontainer/devcontainer.json b/docs/settings/linux/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..0c4e15df0e --- /dev/null +++ b/docs/settings/linux/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu +{ + "name": "Ubuntu", + "build": { + "dockerfile": "Dockerfile", + // Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04 + // Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon. + "args": { "VARIANT": "ubuntu-22.04" } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + "features": { + "python": "os-provided" + } +}