Initial commit

This commit is contained in:
franz.germann1 2024-10-23 11:05:26 +02:00
parent acb7d15bb7
commit da78de47af
3 changed files with 26 additions and 3 deletions

View file

@ -1,2 +1,16 @@
FROM golang:latest
WORKDIR /the/workdir/path
FROM golang:latest AS builder
WORKDIR shared-data/app
COPY shared-data/repo/ ./
# RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o fibonacci_go .
FROM alpine:latest
WORKDIR shared-data/app
COPY --from=builder /shared-data/app/fibonacci_go .
ENTRYPOINT [ "/shared-data/app/fibonacci_go" ]

View file

@ -94,12 +94,18 @@ spec:
- name: build
container:
image: ubuntu:latest
image: docker:latest
command: [sh, -c]
args:
- |
ls -la /
ls -la /shared-data
cd /shared-data/repo
docker build . -t fibonacci_go
docker tag fibonacci_go forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw/fibonacci_go:latest
docker login ...
docker push ...
volumeMounts:
- name: shared-data
mountPath: /shared-data

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW/fibonacci_go
go 1.23.2