Sha256: eec3c98103627f4e2cbbfdb74b2cb1d3fe71561705bad074e7b6149ee2895abd

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

FROM golang:1.18-alpine AS builder

# Update/Upgrade/Add packages for building

RUN apk add --no-cache bash git build-base

# Create appuser.
ENV USER=appuser
ENV UID=10001

RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "/none" \
    --shell "/sbin/nologin" \
    --no-create-home \
    --uid "${UID}" \
    "${USER}"


# Build betterlog

WORKDIR /build/betterlog

ADD . .

ENV GOPATH=/build/betterlog/gospace

RUN make clobber

RUN make setup all

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags='-w -s' -o betterlog-server cmd/betterlog-server/main.go

FROM scratch AS runner

COPY --from=builder /etc/passwd /etc/passwd

COPY --from=builder /etc/group /etc/group

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

WORKDIR /

COPY --from=builder --chown=appuser:appuser /build/betterlog/betterlog-server /

EXPOSE 5514

ENTRYPOINT [ "/betterlog-server" ]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
betterlog-0.20.3 Dockerfile