2019-12-28 20:23:25 +01:00
|
|
|
ARG BASE_IMAGE_ARCH="amd64"
|
|
|
|
ARG ALPINE_LINUX_VERSION="3.11"
|
|
|
|
|
|
|
|
FROM golang:1-alpine${ALPINE_LINUX_VERSION} as build
|
|
|
|
ARG APP_VERSION
|
|
|
|
ARG APP_ARCH="amd64"
|
2019-03-15 04:54:05 +01:00
|
|
|
WORKDIR /go/src/app
|
|
|
|
RUN apk add --no-cache --update build-base git
|
|
|
|
COPY . .
|
2019-12-28 20:23:25 +01:00
|
|
|
RUN make linux-${APP_ARCH} VERSION=${APP_VERSION}
|
|
|
|
RUN cp /go/src/app/miniflux-linux-${APP_ARCH} /go/src/app/miniflux
|
2019-03-15 04:54:05 +01:00
|
|
|
|
2019-12-28 20:23:25 +01:00
|
|
|
FROM ${BASE_IMAGE_ARCH}/alpine:${ALPINE_LINUX_VERSION}
|
2019-03-15 04:54:05 +01:00
|
|
|
EXPOSE 8080
|
|
|
|
ENV LISTEN_ADDR 0.0.0.0:8080
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata
|
2019-12-28 20:23:25 +01:00
|
|
|
COPY --from=build /go/src/app/miniflux /usr/bin/miniflux
|
2019-03-15 04:54:05 +01:00
|
|
|
USER nobody
|
|
|
|
CMD ["/usr/bin/miniflux"]
|