Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4b5ba4f
update common tools
nolte Sep 28, 2023
3951b80
bump up
nolte Sep 28, 2023
5ed7fcd
add id
nolte Sep 28, 2023
a66d52c
...
nolte Sep 28, 2023
f2551d7
...
nolte Sep 28, 2023
ae0da1f
:(
nolte Sep 28, 2023
df6f693
remove id
nolte Sep 28, 2023
20b4359
...
nolte Sep 28, 2023
9b2fd48
...
nolte Sep 28, 2023
9fe8c66
da
nolte Sep 28, 2023
71bc350
fix
nolte Sep 28, 2023
b5febd3
da
nolte Sep 28, 2023
6ede7ab
...
nolte Sep 28, 2023
10c195f
da
nolte Sep 28, 2023
d45ea00
da
nolte Sep 28, 2023
59be146
add configs
nolte Sep 28, 2023
6245a2a
debug
nolte Sep 28, 2023
d34533d
...
nolte Sep 28, 2023
376885e
add devops build
nolte Sep 28, 2023
6074b98
add extra lib
nolte Sep 28, 2023
bcc8107
add python build
nolte Sep 28, 2023
0bc63dc
config steps
nolte Sep 28, 2023
433f8ee
renamed registry
nolte Sep 28, 2023
ff40173
add tag variable
nolte Sep 29, 2023
036a2ba
add build args
nolte Sep 29, 2023
adfe02a
try ...
nolte Sep 29, 2023
93e4072
env
nolte Sep 29, 2023
c98ecc8
add generated tag
nolte Sep 29, 2023
b654a18
echo
nolte Sep 29, 2023
d8e0fbc
needs
nolte Sep 29, 2023
c0cbbaf
use ref var
nolte Sep 29, 2023
4c9fb15
ref
nolte Sep 29, 2023
2b9c8d8
da
nolte Sep 29, 2023
c6387f1
replace
nolte Sep 29, 2023
590e0d0
debug
nolte Sep 29, 2023
0bba1dd
debug
nolte Sep 29, 2023
832bd6b
,,,
nolte Sep 29, 2023
3eeb4c6
with
nolte Sep 30, 2023
4cb50da
allow load
nolte Sep 30, 2023
c65694d
...
nolte Sep 30, 2023
80c811e
....
nolte Sep 30, 2023
8faac64
driver docker
nolte Sep 30, 2023
9d4f527
platform
nolte Sep 30, 2023
29f77f7
...
nolte Sep 30, 2023
836f662
push all
nolte Sep 30, 2023
7c0596c
...
nolte Sep 30, 2023
2d619e4
..
nolte Sep 30, 2023
df13790
...
nolte Sep 30, 2023
991a778
disable
nolte Sep 30, 2023
e234538
try to delete
nolte Oct 3, 2023
9c3df9b
cleanup
nolte Oct 3, 2023
0311cd7
change
nolte Oct 3, 2023
b7cd327
matrix
nolte Oct 3, 2023
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
1 change: 1 addition & 0 deletions .chezmoidata.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fofa = das
20 changes: 10 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM docker.pkg.github.com/nolte/vscode-devcontainers/devops:latest

RUN mkdir -p ${WORKON_HOME} \
&& virtualenv -p python3 ${WORKON_HOME}/development \
&& source ${WORKON_HOME}/development/bin/activate \
&& pip install pytest autopep8 pylint jsbeautifier tox \
&& deactivate
# RUN mkdir -p ${WORKON_HOME} \
# && virtualenv -p python3 ${WORKON_HOME}/development \
# && source ${WORKON_HOME}/development/bin/activate \
# && pip install pytest autopep8 pylint jsbeautifier tox \
# && deactivate

RUN mkdir -p ${WORKON_HOME} \
&& virtualenv -p python3 ${WORKON_HOME}/cookiecutter \
&& source ${WORKON_HOME}/cookiecutter/bin/activate \
&& pip install cookiecutter jinja2-ansible-filters pytest-cookies json-diff autopep8 pylint jsbeautifier \
&& deactivate
# RUN mkdir -p ${WORKON_HOME} \
# && virtualenv -p python3 ${WORKON_HOME}/cookiecutter \
# && source ${WORKON_HOME}/cookiecutter/bin/activate \
# && pip install cookiecutter jinja2-ansible-filters pytest-cookies json-diff autopep8 pylint jsbeautifier \
# && deactivate
40 changes: 40 additions & 0 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Branch Deleted

#on: delete

on:
push:
branches: ["feature/bump-up", "master"]
pull_request:
branches: [master]

jobs:
delete:
strategy:
matrix:
image:
- vscode-devcontainers/commons
- vscode-devcontainers/devops
- vscode-devcontainers/python
- vscode-devcontainers/commons-golang

# if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- id: env-setup
run: |
export image_tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
export image_tag=$(echo $image_tag | tr / -)

echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
- name: Delete image
uses: lazyfrosch/ghcr-delete-image-action@main
continue-on-error: true
with:
# NOTE: at now only orgs is supported
owner: ${{ github.actor }}
name: ${{ matrix.image }}
is_user: true
# NOTE: using Personal Access Token
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.env-setup.outputs.image_tag }}
228 changes: 133 additions & 95 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,128 +2,166 @@ name: Docker Image CI

on:
push:
branches: ["feature/ghworkflow", "master"]
branches: ["feature/bump-up", "master"]
pull_request:
branches: [master]


jobs:
prepare:
runs-on: ubuntu-latest
steps:
- id: env-setup
run: |
export image_tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
export image_tag=$(echo $image_tag | tr / -)

echo "image_tag=$image_tag" >> $GITHUB_OUTPUT
outputs:
image_tag: ${{ steps.env-setup.outputs.image_tag }}

commons:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
#- name: Build the Docker image
# run: docker build -f ./images/commons/Dockerfile -t vscode-commons:$(date +%s) ./images/commons/.
- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
- id: build
name: Push to GitHub Packages
uses: docker/build-push-action@v5.0.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/commons
dockerfile: ./images/commons/Dockerfile
path: ./images/commons/.
tag_with_ref: false
add_git_labels: true
tags: latest
commonsgolang:
context: ./images/commons/.
tags: ghcr.io/nolte/vscode-devcontainers/commons:${{ needs.prepare.outputs.image_tag }}
# outputs: type=docker,dest=/tmp/commons.tar


push: true
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: commons
# path: /tmp/commons.tar



devops:
runs-on: ubuntu-latest
needs: commons
needs: [commons,prepare]
steps:
- uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/commons-golang
dockerfile: ./images/commons-golang/Dockerfile
path: ./images/commons-golang/.
tag_with_ref: false
add_git_labels: true
tags: latest
devgolang:
runs-on: ubuntu-latest
needs: commonsgolang
steps:
- uses: actions/checkout@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - name: Download artifact
# uses: actions/download-artifact@v3
# with:
# name: commons
# path: /tmp
# - name: Load image
# run: |
# # docker buildx use default
# echo "Tag"
# echo ${{ needs.prepare.outputs.image_tag }}
# echo "---"
# docker load --input /tmp/commons.tar
# echo "---"
# docker image ls -a
# echo "---"


- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
uses: docker/build-push-action@v5.0.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/golang
dockerfile: ./images/dev-golang/Dockerfile
path: ./images/dev-golang/.
tag_with_ref: false
add_git_labels: true
tags: latest
devops:

context: ./images/devops/.
tags: ghcr.io/nolte/vscode-devcontainers/devops:${{ needs.prepare.outputs.image_tag }}
build-args: FROM_IMAGE_VERSION=${{ needs.prepare.outputs.image_tag }}

push: true
commonsgolang:
runs-on: ubuntu-latest
needs: devgolang
needs: [commons,prepare]
steps:
- uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/devops
dockerfile: ./images/devops/Dockerfile
path: ./images/devops/.
tag_with_ref: false
add_git_labels: true
tags: latest
npm:
runs-on: ubuntu-latest
needs: devgolang
steps:
- uses: actions/checkout@v2
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Download artifact
# uses: actions/download-artifact@v3
# with:
# name: commons
# path: /tmp
# - name: Load image
# run: |
# docker load --input /tmp/commons.tar

- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
uses: docker/build-push-action@v5.0.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/npm
dockerfile: ./images/npm/Dockerfile
path: ./images/npm/.
tag_with_ref: false
add_git_labels: true
tags: latest
context: ./images/commons-golang/.
tags: ghcr.io/nolte/vscode-devcontainers/commons-golang:${{ needs.prepare.outputs.image_tag }}
#outputs: type=docker,dest=/tmp/commons-golang.tar
build-args: FROM_IMAGE_VERSION=${{ needs.prepare.outputs.image_tag }}
push: true
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: commons-golang
path: /tmp/commons-golang.tar

python:
runs-on: ubuntu-latest
needs: devgolang
needs: [commonsgolang,prepare]
steps:
- uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/python
dockerfile: ./images/python/Dockerfile
path: ./images/python/.
tag_with_ref: false
add_git_labels: true
tags: latest
k8soperator:
runs-on: ubuntu-latest
needs: [devgolang, devops]
steps:
- uses: actions/checkout@v2
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Download artifact
# uses: actions/download-artifact@v3
# with:
# name: commons-golang
# path: /tmp
# - name: Load image
# run: |
# docker load --input /tmp/commons-golang.tar

- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.0
uses: docker/build-push-action@v5.0.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: nolte/vscode-devcontainers/k8s-operator
dockerfile: ./images/k8sOperator/Dockerfile
path: ./images/k8sOperator/.
tag_with_ref: false
add_git_labels: true
tags: latest
context: ./images/python/.
tags: ghcr.io/nolte/vscode-devcontainers/python:${{ needs.prepare.outputs.image_tag }}
build-args: FROM_IMAGE_VERSION=${{ needs.prepare.outputs.image_tag }}


push: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: build
REGISTRY=docker.pkg.github.com/nolte/vscode-devcontainers
REGISTRY=ghcr.io/nolte/vscode-devcontainers

default: build

Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Visual Studo Code DevContainers

The Containers are tested with Docker ``19.03.8`` and based on [qdm12/basedevcontainer](https://github.com/qdm12/basedevcontainer).
A standardised development environment is necessary for working on a wide range of projects, even after a certain period of time has elapsed.

So we create a set of pre configured [Dev Containers](https://code.visualstudio.com/docs/remote/containers) based on [qdm12/basedevcontainer](https://github.com/qdm12/basedevcontainer).

## Usage

Expand Down Expand Up @@ -30,30 +32,23 @@ For build the images localy use the ``Makefile`` with ``make build`` and trink a

| *image* (*project_type*) | *base on* | *description* |
|---------------------------------------------------------------------------------|------------------------------------|---------------|
| ```docker.pkg.github.com/nolte/vscode-devcontainers/commons``` _(default)_ | | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/devops``` _(devops)_ | ```vscode-devcontainers/commons``` | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/python``` _(python)_ | ```vscode-devcontainers/commons``` | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/golang``` _(golang)_ | ```vscode-devcontainers/commons``` | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/k8s-operator``` _(default)_ | ```vscode-devcontainers/golang``` | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/npm``` _(npm)_ | ```vscode-devcontainers/commons``` | |
| ```docker.pkg.github.com/nolte/vscode-devcontainers/iot``` _(iot)_ | ```vscode-devcontainers/commons``` | |
| ```ghcr.io/nolte/vscode-devcontainers/commons``` _(default)_ | | |
| ```ghcr.io/nolte/vscode-devcontainers/devops``` _(devops)_ | ```vscode-devcontainers/commons``` | |
| ```ghcr.io/nolte/vscode-devcontainers/python``` _(python)_ | ```vscode-devcontainers/commons``` | |
| ```ghcr.io/nolte/vscode-devcontainers/golang``` _(golang)_ | ```vscode-devcontainers/commons``` | |
| ```ghcr.io/nolte/vscode-devcontainers/k8s-operator``` _(default)_ | ```vscode-devcontainers/golang``` | |
| ```ghcr.io/nolte/vscode-devcontainers/npm``` _(npm)_ | ```vscode-devcontainers/commons``` | |
| ```ghcr.io/nolte/vscode-devcontainers/iot``` _(iot)_ | ```vscode-devcontainers/commons``` | |


... sorry but at the moment the Pulic Github Docker Repoisitory is not realy public like [hub.docker.com]. see ([github.community](https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782))

```bash
pass internet/github.com/nolte/package_management_token | docker login docker.pkg.github.com --username nolte --password-stdin
pass internet/github.com/nolte/package_management_token | docker login ghcr.io --username nolte --password-stdin
```

### Basement Env

### DevOps Env

Installed tools like [terraform](),[helm](),[kubectl](),[ansible]() and many more.

#### Extra Terraform Providers

* [terraform-provider-keycloak](https://github.com/mrparkers/terraform-provider-keycloak)
* [terraform-provider-minio](https://github.com/aminueza/terraform-provider-minio)
* [terraform-provider-kubectl](https://github.com/gavinbunney/terraform-provider-kubectl)
* [terraform-harbor-provider](https://github.com/BESTSELLER/terraform-harbor-provider)
This env will be configured by the [twpayne/chezmoi](https://github.com/twpayne/chezmoi) based Configuration scripts, [nolte/workstation](https://github.com/nolte/workstation).
Loading