From aa4b76b629e376f24dcb21d38fa7cd50e6d34a2e Mon Sep 17 00:00:00 2001 From: Thomas Carmet Date: Wed, 12 Jul 2023 20:11:37 +0000 Subject: [PATCH] Updates and fix to devcontainer environment --- .devcontainer/Dockerfile | 24 +++++++++--------------- .devcontainer/devcontainer.json | 1 + 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8c49d7e1..4622dfe7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,20 +1,14 @@ FROM mcr.microsoft.com/devcontainers/python:3.10-bullseye -# Install poetry - -ENV POETRY_VERSION=1.3.2 -RUN pipx install poetry==${POETRY_VERSION} - -# Configure poetry to not use a virtual environment - -RUN poetry config virtualenvs.create false +# Install kustomize +ARG KUSTOMIZE_VERSION=5.1.0 -# Workdir +RUN curl -sSL -o /tmp/kustomize.tar.gz \ + "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" && \ + tar -xf /tmp/kustomize.tar.gz && \ + mv kustomize /usr/local/bin/ -WORKDIR /workspaces/runner-manager - -# Install the project dependencies - -COPY poetry.lock pyproject.toml /workspaces/runner-manager/ +# Install poetry -RUN poetry install --no-interaction --no-ansi --no-root +ARG POETRY_VERSION=1.3.2 +RUN pipx install poetry==${POETRY_VERSION} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fe94f412..1dbe4cd6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,6 +11,7 @@ "ghcr.io/devcontainers/features/docker-in-docker:1": {}, "ghcr.io/devcontainers/features/kubectl-helm-minikube": {} }, + "postCreateCommand": "poetry install --no-interaction --no-ansi --no-root", "customizations": { "vscode": { "extensions": [