From f8eee2f18de38e30673305ba9311091aae69e8c0 Mon Sep 17 00:00:00 2001 From: Norman Gehrsitz Date: Wed, 15 Nov 2023 00:46:00 +0100 Subject: [PATCH] Set /code as the default WORKDIR --- Dockerfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17c276537..410fe31ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -a -installsuffix cgo -o swag cmd/swag/ ######## Start a new stage from scratch ####### FROM scratch -WORKDIR /root/ +WORKDIR /code/ # Copy the Pre-built binary file from the previous stage COPY --from=builder /app/swag /bin/swag diff --git a/README.md b/README.md index 9d8769c9e..05462671c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ To build from source you need [Go](https://golang.org/dl/) (1.17 or newer). Alternatively you can run the docker image: ```sh -docker run --rm -v $(pwd):/code -w /code ghcr.io/swaggo/swag:latest +docker run --rm -v $(pwd):/code ghcr.io/swaggo/swag:latest ``` Or download a pre-compiled binary from the [release page](https://github.com/swaggo/swag/releases).