Skip to content

Commit

Permalink
added mdbook build for production
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatsnake committed Jan 29, 2023
1 parent 9ff37f7 commit 66a4432
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ ENV CGO_ENABLED 0
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# download mdbook to compile docs
RUN wget https://github.com/rust-lang/mdBook/releases/download/v0.4.25/mdbook-v0.4.25-x86_64-unknown-linux-gnu.tar.gz
RUN tar -xzf mdbook-v0.4.25-x86_64-unknown-linux-gnu.tar.gz
COPY . .
RUN go build -o app cmd/server/main.go
RUN ./mdbook build

FROM alpine:latest AS prod
RUN apk add --no-cache ca-certificates
Expand Down

0 comments on commit 66a4432

Please sign in to comment.