From 32baedb373fbdb35d5a0a682f84267d0c3db0b44 Mon Sep 17 00:00:00 2001 From: Kurtis Seebaldt Date: Thu, 8 Sep 2022 15:27:20 -0500 Subject: [PATCH] Add config for vscode dev container --- .devcontainer/Dockerfile | 3 +++ .devcontainer/devcontainer.json | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..61e80c2 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,3 @@ +FROM amazon/aws-glue-libs:glue_libs_3.0.0_image_01 + +RUN pip3 install poetry diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..923d5eb --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,41 @@ +// 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.0/containers/python-3 +{ + "name": "AWS Glue", + "build": { + "dockerfile": "Dockerfile", + "context": "..", + "args": { + } + }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "./.venv/bin/python", + "python.analysis.extraPaths": [ + "/home/glue_user/aws-glue-libs/PyGlue.zip:/home/glue_user/spark/python/lib/py4j-0.10.9-src.zip:/home/glue_user/spark/python/", + ] + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance" + ] + } + }, + + // 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": "pip3 install --user -r requirements.txt", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "glue_user", + "postStartCommand": "poetry install" +}