Back to Go Swagger

Install from Docker

docs/install/install-docker.md

0.33.22.1 KB
Original Source

Running from Docker

{{<hint "info">}} We release current master as docker images too.

Images are built for architectures: linux/amd64, linux/arm/v7, linux/arm64 and linux/ppc64le,linux/s390x. {{</hint>}}

Docker image

First grab the image:

  1. From quay.io

sh
docker pull quay.io/goswagger/swagger

or

  1. From Github registry

sh
docker pull ghcr.io/go-swagger/go-swagger

{{<tabs "dockerInstallType">}} {{<tab "MacOS/Linux" >}}

For Mac and Linux users

sh
REPO="quay.io"    #<- or "ghcr.io"
alias swagger='docker run --rm -it  --user $(id -u):$(id -g) -v $HOME:$HOME -w $PWD $REPO/goswagger/swagger'
swagger version

{{</tab>}} {{<tab "Windows" >}}

For windows users

cmd
REM <- or "ghcr.io"
set REPO=quay.io
docker run --rm -it  -v %CD%:/app -w /app %REPO%/goswagger/swagger

You can put the following in a file called swagger.bat and include it in your path environment variable to act as an alias.

cmd
@echo off
REM <- or "ghcr.io"
set REPO=quay.io
echo.
docker run --rm -it -v %CD%:/app -w /app %REPO%/goswagger/swagger %*

{{</tab>}}

{{</tabs>}}