diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index d5d4ebd..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,55 +0,0 @@ -// 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.233.0/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-20.04" } - }, - - // Set *default* container specific settings.json values on container create. - "settings": {}, - - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [], - - // 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": { - "docker-in-docker": "latest", - "docker-from-docker": "latest", - "kubectl-helm-minikube": {//https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/kubectl-helm.md - "kubectl": "1.22.8", - "helm": "3.8.2", - "minikube": "none" - }, - "terraform": "1.2.7", - "git": "latest", - "git-lfs": "latest", - "github-cli": "latest", - "aws-cli": "latest", - "sshd": "latest", - "node": "18.7.0", - "python": "3.10.4", - "golang": "1.19", - "powershell": "latest" - }, - "customizations": { - "codespaces": { - "repositories": { - "GlueOps/*": { - "permissions": "write-all" - } - } - } - } -} diff --git a/.github/workflows/build_and_publish_devcontainer.yml b/.github/workflows/build_and_publish_devcontainer.yml deleted file mode 100644 index cd00bac..0000000 --- a/.github/workflows/build_and_publish_devcontainer.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 'Build and Publish devcontainer image' -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - name: Checkout (GitHub) - uses: actions/checkout@v2 - - - name: Log in to Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and run dev container task - uses: devcontainers/ci@v0.2 - with: - # Change this to point to your image name - imageName: glueops/codespaces - imageTag: ${{ github.ref_name }} - push: always diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..4185896 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,45 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: glueops/codespaces + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64 diff --git a/.devcontainer/Dockerfile b/Dockerfile similarity index 88% rename from .devcontainer/Dockerfile rename to Dockerfile index fb4b51a..ba9ec9b 100644 --- a/.devcontainer/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends +RUN apt-get update && apt-get -y install gettext-base tmux \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* ENV CLOUDSDK_INSTALL_DIR /usr/local/gcloud/ RUN curl -sSL https://sdk.cloud.google.com | bash @@ -17,6 +20,5 @@ RUN gcloud components install alpha --quiet RUN gcloud components install beta --quiet RUN sh -c "$(curl --location https://raw.githubusercontent.com/go-task/task/v3.14.1/install-task.sh)" -- -d -b /usr/local/bin/ RUN curl https://stedolan.github.io/jq/download/linux64/jq > /usr/local/bin/jq && sudo chmod +x /usr/local/bin/jq -RUN apt update && apt install tmux -y && apt clean -y RUN curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.4.11/argocd-linux-amd64 -RUN chmod +x /usr/local/bin/argocd +RUN chmod +x /usr/local/bin/argocd \ No newline at end of file