diff options
author | 2023-10-24 13:21:05 +0200 | |
---|---|---|
committer | 2023-10-24 13:21:05 +0200 | |
commit | 30b53f352b9aab5df472be215656736ccb30a35b (patch) | |
tree | a05c58ac390cc3f34da647c394fa19e39b0ec4f9 | |
parent | [bugfix/frontend] Add `nosubmit` option to form fields + use it when instance... (diff) | |
download | gotosocial-30b53f352b9aab5df472be215656736ccb30a35b.tar.xz |
[chore] bump go swagger version in build (#2292)
-rw-r--r-- | Dockerfile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index 7c1cce4d2..8cf8ee3cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,21 @@ # Dockerfile reference: https://docs.docker.com/engine/reference/builder/ # stage 1: generate up-to-date swagger.yaml to put in the final container -FROM --platform=${BUILDPLATFORM} quay.io/goswagger/swagger:v0.30.4 AS swagger +FROM --platform=${BUILDPLATFORM} golang:1.21-alpine AS swagger + +RUN \ + ### Installs goswagger for building swagger definitions inside this container + go install "github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5" && \ + # Makes swagger executable + chmod +x /go/bin/swagger COPY go.mod /go/src/github.com/superseriousbusiness/gotosocial/go.mod COPY go.sum /go/src/github.com/superseriousbusiness/gotosocial/go.sum COPY cmd /go/src/github.com/superseriousbusiness/gotosocial/cmd COPY internal /go/src/github.com/superseriousbusiness/gotosocial/internal + WORKDIR /go/src/github.com/superseriousbusiness/gotosocial -RUN swagger generate spec -o /go/src/github.com/superseriousbusiness/gotosocial/swagger.yaml --scan-models +RUN /go/bin/swagger generate spec -o /go/src/github.com/superseriousbusiness/gotosocial/swagger.yaml --scan-models # stage 2: generate the web/assets/dist bundles FROM --platform=${BUILDPLATFORM} node:18-alpine AS bundler |