Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline devcontainer #456

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Docker environment for local development in devcontainer
FROM docker.io/alpine/helm:3.13.3 as helm
FROM docker.io/bitnami/kubectl:1.28.5 as kubectl
FROM ghcr.io/fluxcd/flux-cli:v2.2.1 as flux
FROM ghcr.io/kyverno/kyverno-cli:v1.10.7 as kyverno
FROM registry.k8s.io/kustomize/kustomize:v5.3.0 as kustomize

FROM ubuntu:jammy-20231128

Expand All @@ -17,15 +12,13 @@ RUN apt-get update --fix-missing && \
git \
python3-pip

COPY . /src/
WORKDIR /src/
RUN pip3 install -r /src/requirements.txt
RUN pip3 install -e /src/

COPY --from=ghcr.io/fluxcd/flux-cli:v2.2.1 /usr/local/bin/flux /usr/local/bin/flux
COPY --from=docker.io/alpine/helm:3.13.3 /usr/bin/helm /usr/local/bin/helm
COPY --from=docker.io/bitnami/kubectl:1.28.5 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/kubectl
COPY --from=registry.k8s.io/kustomize/kustomize:v5.3.0 /app/kustomize /usr/local/bin/kustomize
COPY --from=ghcr.io/kyverno/kyverno-cli:v1.10.7 /ko-app/kubectl-kyverno /usr/local/bin/kyverno
COPY --from=docker.io/alpine/helm:3.13.3 /usr/bin/helm /usr/local/bin/helm
COPY --from=ghcr.io/fluxcd/flux-cli:v2.2.1 /usr/local/bin/flux /usr/local/bin/flux

COPY requirements.txt /src/
RUN pip3 install -r /src/requirements.txt

SHELL ["/bin/bash", "-c"]
10 changes: 7 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/kubernetes-helm
{
"name": "Kubernetes - Local Configuration",
"build": {
"context": "..",
"dockerfile": "./Dockerfile"
}
},
// Creates a local volume where you the developer need to clone the git
// repo inside the container. Uses a local volume since this project
// relies heavily on local disk performance.
"workspaceMount": "source=flux-local,target=/workspaces,type=volume",
"workspaceFolder": "/workspaces/",
"postCreateCommand": "chown vscode /workspaces",
}
Loading