added docker and go templates.
authorErik Brakkee <erik@brakkee.org>
Mon, 11 Nov 2024 18:48:33 +0000 (19:48 +0100)
committerErik Brakkee <erik@brakkee.org>
Mon, 11 Nov 2024 18:48:33 +0000 (19:48 +0100)
images/compose.yaml [new file with mode: 0644]
images/go.1.23.2/Dockerfile [new file with mode: 0644]
resources/podtemplates/docker.yaml [new file with mode: 0644]
resources/podtemplates/go.1.23.2.yaml [new file with mode: 0644]

diff --git a/images/compose.yaml b/images/compose.yaml
new file mode 100644 (file)
index 0000000..6a59a5e
--- /dev/null
@@ -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 (file)
index 0000000..e78d811
--- /dev/null
@@ -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 (file)
index 0000000..527b7db
--- /dev/null
@@ -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 (file)
index 0000000..437a5d0
--- /dev/null
@@ -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: {}