From 160e4390e10864d07cf34bd9f5037692ac9a00ff Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Mon, 11 Nov 2024 19:48:33 +0100 Subject: [PATCH] added docker and go templates. --- images/compose.yaml | 8 ++++++++ images/go.1.23.2/Dockerfile | 13 +++++++++++++ resources/podtemplates/docker.yaml | 14 ++++++++++++++ resources/podtemplates/go.1.23.2.yaml | 12 ++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 images/compose.yaml create mode 100644 images/go.1.23.2/Dockerfile create mode 100644 resources/podtemplates/docker.yaml create mode 100644 resources/podtemplates/go.1.23.2.yaml diff --git a/images/compose.yaml b/images/compose.yaml new file mode 100644 index 0000000..6a59a5e --- /dev/null +++ b/images/compose.yaml @@ -0,0 +1,8 @@ + +services: + + gobuilder: + image: wamblee/gobuilder:1.23.2 + build: + context: go.1.23.2 + diff --git a/images/go.1.23.2/Dockerfile b/images/go.1.23.2/Dockerfile new file mode 100644 index 0000000..e78d811 --- /dev/null +++ b/images/go.1.23.2/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.23.3-alpine3.20 + +RUN apk update && apk add curl make + +# if templ cannot be obtained: quick fix, remove this statement and run make, then build the image. +RUN curl -L https://github.com/a-h/templ/releases/download/v0.2.747/templ_Linux_x86_64.tar.gz -o templ.tar.gz && \ + tar xvzf templ.tar.gz templ && \ + chmod 755 templ && \ + mv templ /bin +ENV CGO_ENABLED=0 + + +ENTRYPOINT ["tail", "-f", "/dev/null" ] diff --git a/resources/podtemplates/docker.yaml b/resources/podtemplates/docker.yaml new file mode 100644 index 0000000..527b7db --- /dev/null +++ b/resources/podtemplates/docker.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - image: docker:27.3.1 + name: docker + securityContext: + privileged: true + volumeMounts: + - name: run + mountPath: /run + volumes: + - name: run + emptyDir: {} diff --git a/resources/podtemplates/go.1.23.2.yaml b/resources/podtemplates/go.1.23.2.yaml new file mode 100644 index 0000000..437a5d0 --- /dev/null +++ b/resources/podtemplates/go.1.23.2.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - image: wamblee/gobuilder:1.23.2 + name: gobuilder + volumeMounts: + - name: run + mountPath: /run + volumes: + - name: run + emptyDir: {} -- 2.31.1