Browse Source

Update Dockerfiles to newer (roughly) pinned versions

logrus
IamTheFij 2 years ago
parent
commit
f6ccd9a3bd
  1. 5
      Dockerfile
  2. 6
      Dockerfile.multi-stage

5
Dockerfile

@ -1,4 +1,5 @@
FROM ${REPO}/alpine:latest
ARG REPO=library
FROM ${REPO}/alpine:3.10
RUN mkdir /app
WORKDIR /app/
@ -7,7 +8,7 @@ ARG ARCH=amd64
COPY ./minitor-go ./minitor
# Add common checking tools
RUN apk --no-cache add bash==4.4.19-r1 curl==7.64.0-r3 jq==1.6-r0
RUN apk --no-cache add bash=~5.0 curl=~7.66 jq=~1.6
# Add minitor user for running as non-root
RUN addgroup -S minitor && adduser -S minitor -G minitor

6
Dockerfile.multi-stage

@ -1,7 +1,7 @@
ARG REPO=library
FROM golang:1.12-alpine AS builder
RUN apk add --no-cache git
RUN apk add --no-cache git=~2
RUN mkdir /app
WORKDIR /app
@ -16,7 +16,7 @@ ARG VERSION=dev
ENV CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH}
RUN go build -ldflags "-X main.version=${VERSION}" -a -installsuffix nocgo -o minitor .
FROM ${REPO}/alpine:latest
FROM ${REPO}/alpine:3.10
RUN mkdir /app
WORKDIR /app/
@ -24,7 +24,7 @@ WORKDIR /app/
COPY --from=builder /app/minitor .
# Add common checking tools
RUN apk --no-cache add bash==4.4.19-r1 curl==7.64.0-r3 jq==1.6-r0
RUN apk --no-cache add bash=~5.0 curl=~7.66 jq=~1.6
# Add minitor user for running as non-root
RUN addgroup -S minitor && adduser -S minitor -G minitor

Loading…
Cancel
Save