summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-10-24 13:21:05 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-24 13:21:05 +0200
commit30b53f352b9aab5df472be215656736ccb30a35b (patch)
treea05c58ac390cc3f34da647c394fa19e39b0ec4f9
parent[bugfix/frontend] Add `nosubmit` option to form fields + use it when instance... (diff)
downloadgotosocial-30b53f352b9aab5df472be215656736ccb30a35b.tar.xz
[chore] bump go swagger version in build (#2292)
-rw-r--r--Dockerfile11
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