Skip to content

Commit

Permalink
checkpoint 2024-06-16 15:40:01
Browse files Browse the repository at this point in the history
  • Loading branch information
theruziev committed Jun 16, 2024
1 parent 0bc863e commit 0bc626c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
run:
timeout: 5m
skip-dirs:
exclude-dirs:
- vendor

linters-settings:
govet:
check-shadowing: true
maligned:
suggest-new: true
disable-all: true
enable:
- shadow
goconst:
min-len: 2
min-occurrences: 2
Expand Down
11 changes: 8 additions & 3 deletions .theruziev/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ ARG PACKAGE_PREFIX=""
ARG GIT_TAG="dev"
ARG GIT_COMMIT=""

RUN apk update && apk upgrade && apk add --no-cache ca-certificates tzdata
RUN apk update && apk upgrade && apk add --no-cache ca-certificates tzdata shadow
RUN update-ca-certificates
RUN useradd -u 10001 app


WORKDIR /app
Expand All @@ -24,9 +25,10 @@ RUN go build -o app -ldflags="\

FROM scratch

COPY --from=builder /app/app .
COPY --from=builder /app/app /srv/app
COPY --from=builder /etc/ssl /etc/ssl/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/passwd /etc/passwd

# import curl from current repository image
COPY --from=ghcr.io/tarampampam/curl:8.0.1 /bin/curl /bin/curl
Expand All @@ -36,7 +38,10 @@ HEALTHCHECK --interval=5s --timeout=2s --retries=5 --start-period=2s CMD [ \
"curl", "--fail", "http://127.0.0.1:8080/ready" \
]

ENTRYPOINT ["/app", "server"]

USER app

ENTRYPOINT ["/srv/app", "server"]



0 comments on commit 0bc626c

Please sign in to comment.