mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #35749 from thaJeztah/change-swagger-install
Update go-swagger installation steps in Dockerfile
This commit is contained in:
commit
0f6dc962a5
2 changed files with 12 additions and 6 deletions
|
@ -146,9 +146,12 @@ RUN pip install yamllint==1.5.0
|
||||||
|
|
||||||
# Install go-swagger for validating swagger.yaml
|
# Install go-swagger for validating swagger.yaml
|
||||||
ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
|
ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
|
||||||
RUN git clone https://github.com/go-swagger/go-swagger.git /go/src/github.com/go-swagger/go-swagger \
|
RUN set -x \
|
||||||
&& (cd /go/src/github.com/go-swagger/go-swagger && git checkout -q $GO_SWAGGER_COMMIT) \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& go install -v github.com/go-swagger/go-swagger/cmd/swagger
|
&& git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
|
||||||
|
&& (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \
|
||||||
|
&& go build -o /usr/local/bin/swagger github.com/go-swagger/go-swagger/cmd/swagger \
|
||||||
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Set user.email so crosbymichael's in-container merge commits go smoothly
|
# Set user.email so crosbymichael's in-container merge commits go smoothly
|
||||||
RUN git config --global user.email 'docker-dummy@example.com'
|
RUN git config --global user.email 'docker-dummy@example.com'
|
||||||
|
|
|
@ -119,9 +119,12 @@ RUN pip install yamllint==1.5.0
|
||||||
|
|
||||||
# Install go-swagger for validating swagger.yaml
|
# Install go-swagger for validating swagger.yaml
|
||||||
ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
|
ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
|
||||||
RUN git clone https://github.com/go-swagger/go-swagger.git /go/src/github.com/go-swagger/go-swagger \
|
RUN set -x \
|
||||||
&& (cd /go/src/github.com/go-swagger/go-swagger && git checkout -q $GO_SWAGGER_COMMIT) \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& go install -v github.com/go-swagger/go-swagger/cmd/swagger
|
&& git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \
|
||||||
|
&& (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \
|
||||||
|
&& go build -o /usr/local/bin/swagger github.com/go-swagger/go-swagger/cmd/swagger \
|
||||||
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Set user.email so crosbymichael's in-container merge commits go smoothly
|
# Set user.email so crosbymichael's in-container merge commits go smoothly
|
||||||
RUN git config --global user.email 'docker-dummy@example.com'
|
RUN git config --global user.email 'docker-dummy@example.com'
|
||||||
|
|
Loading…
Add table
Reference in a new issue