nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

commit ab882552f6b367811a5063f94d41a9b28e7911f8
parent 80db3767e304055b1dfd2b1b0709af245e431162
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Fri, 14 Jun 2024 12:01:49 +0200

feat: add bastard-operator

Diffstat:
Adocker/docker-bastard/Dockerfile | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/docker/docker-bastard/Dockerfile b/docker/docker-bastard/Dockerfile @@ -0,0 +1,27 @@ +FROM docker.io/golang:1.22-alpine as builder + +ARG BUILD_VERSION=v0.1 + +# fetch latest version from git +RUN apk update && apk add --no-cache git +RUN git clone https://github.com/dokshukin/go-bastard-operator.git /build +WORKDIR /build + +# patch link to project +RUN sed -i -E 's#(.*TimeStamp\}\})#\0, https://github.com/dokshukin/go-bastard-operator#' bofh.tmpl + +# build app +RUN go mod init main +RUN go build -v -ldflags="-X 'main.version=$BUILD_VERSION' -X 'main.timestamp=$(date)'" -o bastard_operator . + +# https://github.com/dokshukin/go-bastard-operator/blob/master/Dockerfile +FROM docker.io/alpine:latest + +WORKDIR /app +# Copy the Pre-built binary file from the previous stage +COPY --from=builder /build/bastard_operator . +COPY --from=builder /build/bofh.tmpl . + +EXPOSE 8080/tcp + +CMD ["./bastard_operator"]