mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 22:56:15 -06:00
[chore] Use vendored swagger in Docker container
This commit is contained in:
parent
eb720241da
commit
ab709c1bdb
1 changed files with 2 additions and 7 deletions
|
|
@ -4,19 +4,14 @@
|
||||||
# stage 1: generate up-to-date swagger.yaml to put in the final container
|
# stage 1: generate up-to-date swagger.yaml to put in the final container
|
||||||
FROM --platform=${BUILDPLATFORM} golang:1.23-alpine AS swagger
|
FROM --platform=${BUILDPLATFORM} golang:1.23-alpine AS swagger
|
||||||
|
|
||||||
RUN \
|
|
||||||
### Installs goswagger for building swagger definitions inside this container
|
|
||||||
go install "github.com/go-swagger/go-swagger/cmd/swagger@c46c303aaa02" && \
|
|
||||||
# Makes swagger executable
|
|
||||||
chmod +x /go/bin/swagger
|
|
||||||
|
|
||||||
COPY go.mod /go/src/github.com/superseriousbusiness/gotosocial/go.mod
|
COPY go.mod /go/src/github.com/superseriousbusiness/gotosocial/go.mod
|
||||||
COPY go.sum /go/src/github.com/superseriousbusiness/gotosocial/go.sum
|
COPY go.sum /go/src/github.com/superseriousbusiness/gotosocial/go.sum
|
||||||
COPY cmd /go/src/github.com/superseriousbusiness/gotosocial/cmd
|
COPY cmd /go/src/github.com/superseriousbusiness/gotosocial/cmd
|
||||||
COPY internal /go/src/github.com/superseriousbusiness/gotosocial/internal
|
COPY internal /go/src/github.com/superseriousbusiness/gotosocial/internal
|
||||||
|
COPY vendor /go/src/github.com/superseriousbusiness/gotosocial/vendor
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/superseriousbusiness/gotosocial
|
WORKDIR /go/src/github.com/superseriousbusiness/gotosocial
|
||||||
RUN /go/bin/swagger generate spec -o /go/src/github.com/superseriousbusiness/gotosocial/swagger.yaml --scan-models
|
RUN ./vendor/github.com/go-swagger/go-swagger/cmd/swagger generate spec -o /go/src/github.com/superseriousbusiness/gotosocial/swagger.yaml --scan-models
|
||||||
|
|
||||||
# stage 2: generate the web/assets/dist bundles
|
# stage 2: generate the web/assets/dist bundles
|
||||||
FROM --platform=${BUILDPLATFORM} node:18-alpine AS bundler
|
FROM --platform=${BUILDPLATFORM} node:18-alpine AS bundler
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue