From 85e5b94887a02670b704d3ac06f4a93e98e32982 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Mon, 21 Aug 2023 12:48:07 +0100
Subject: [PATCH] Create a container image

---
 .gitlab-ci.yml |  4 +++-
 Dockerfile     | 10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bd086e3..891dd81 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1 +1,3 @@
-include: "https://git.autistici.org/pipelines/images/test/golang/raw/master/ci.yml"
+include:
+  - "https://git.autistici.org/pipelines/containers/raw/master/common.yml"
+  - "https://git.autistici.org/pipelines/images/test/golang/raw/master/ci.yml"
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e852b41
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM docker.io/library/golang:1.20.1 AS build
+
+WORKDIR /src
+ADD . /src
+RUN go build -ldflags='-extldflags=-static -w -s' -tags osusergo,netgo ./cmd/replds
+
+FROM scratch
+COPY --from=build /src/replds /replds
+
+ENTRYPOINT ["/replds"]
-- 
GitLab