Init
This commit is contained in:
commit
d7373d0522
|
@ -0,0 +1,11 @@
|
|||
build:
|
||||
stage: build
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --destination $CI_REGISTRY_IMAGE:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
|
@ -0,0 +1,12 @@
|
|||
FROM golang:1.20-alpine as builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN go build -o main .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /root
|
||||
COPY --from=builder /app/main .
|
||||
ENTRYPOINT ["./main"]
|
|
@ -0,0 +1,6 @@
|
|||
FROM golang:1.20
|
||||
RUN apt-get update && apt-get install dumb-init
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
CMD ["dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "debug", "--build-flags=-buildvcs=false", "--continue"]
|
|
@ -0,0 +1,5 @@
|
|||
FROM golang:1.20-alpine
|
||||
RUN apk --no-cache add dumb-init
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
CMD ["go", "run", "main.go"]
|
|
@ -0,0 +1,13 @@
|
|||
services:
|
||||
myapp:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.debug
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
ports:
|
||||
- "40000:40000"
|
||||
volumes:
|
||||
- .:/app
|
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
myapp:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
volumes:
|
||||
- .:/app
|
Loading…
Reference in New Issue