Skip to content

Commit

Permalink
Added LABELs to Dockerfile (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
normanjaeckel committed Jan 7, 2022
1 parent ec7035c commit 50083a6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM golang:1.17-alpine as basis
LABEL maintainer="OpenSlides Team <info@openslides.com>"
FROM golang:1.17-alpine as base
WORKDIR /root/

RUN apk add git
Expand All @@ -12,20 +11,20 @@ COPY internal internal
COPY pkg pkg

# Build service in seperate stage.
FROM basis as builder
FROM base as builder
RUN CGO_ENABLED=0 go build ./cmd/autoupdate


# Test build.
FROM basis as testing
FROM base as testing

RUN apk add build-base

CMD go vet ./... && go test ./...


# Development build.
FROM basis as development
FROM base as development

RUN ["go", "install", "github.com/githubnemo/CompileDaemon@latest"]
EXPOSE 9012
Expand All @@ -38,6 +37,11 @@ CMD CompileDaemon -log-prefix=false -build="go build ./cmd/autoupdate" -command=
# Productive build
FROM scratch

LABEL org.opencontainers.image.title="OpenSlides Autoupdate Service"
LABEL org.opencontainers.image.description="The Autoupdate Service is a http endpoint where the clients can connect to get the current data and also updates."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-autoupdate-service"

COPY --from=builder /root/autoupdate .
EXPOSE 9012
ENV MESSAGING redis
Expand Down

0 comments on commit 50083a6

Please sign in to comment.