Skip to content

Commit

Permalink
chore: install wkhtmltopdf in Docker environment for report rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Salaton committed Mar 26, 2024
1 parent defeb7f commit c6adef4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ WORKDIR /app

# Copy go.sum/go.mod and warm up the module cache (so that this
# rather long step can be cached if go.mod/go.sum don't change)
COPY go.* $D/
CMD go mod download
COPY go.* ./
RUN go mod download

ENV GIN_MODE release

# Now copy the rest.
COPY . /app/
COPY . .

# Retrieve application dependencies.
RUN go mod download

# Build the binary.
RUN cd /app/ && CGO_ENABLED=0 GOOS=linux go build -v -o server github.com/savannahghi/clinical
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server github.com/savannahghi/clinical

# Use the official Alpine image for a lean production container.
# https://hub.docker.com/_/alpine
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM alpine:3
RUN apk add --no-cache ca-certificates
RUN apk add --no-cache ca-certificates wkhtmltopdf

# Copy the binary to the production image from the builder stage.
COPY --from=builder /app/server /server
Expand Down

0 comments on commit c6adef4

Please sign in to comment.