-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: futuretea <[email protected]>
- Loading branch information
1 parent
749abed
commit 6506930
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
FROM golang:1.16.5-alpine3.13 | ||
|
||
ARG DAPPER_HOST_ARCH | ||
ENV ARCH $DAPPER_HOST_ARCH | ||
|
||
RUN apk update && apk -U add bash git gcc musl-dev docker vim less file curl wget ca-certificates | ||
|
||
# install goimports | ||
RUN GO111MODULE=on go get golang.org/x/tools/cmd/[email protected] | ||
|
||
## install golangci-lint | ||
RUN if [ "${ARCH}" = "amd64" ]; then \ | ||
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$(go env GOPATH)/bin" v1.27.0; \ | ||
fi | ||
|
||
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS | ||
ENV DAPPER_SOURCE /go/src/github.com/harvester/terraform-provider-harvester | ||
ENV DAPPER_OUTPUT ./bin ./dist | ||
ENV DAPPER_DOCKER_SOCKET true | ||
ENV HOME ${DAPPER_SOURCE} | ||
|
||
WORKDIR ${DAPPER_SOURCE} | ||
ENTRYPOINT ["./scripts/entry"] | ||
CMD ["ci"] | ||
FROM registry.suse.com/bci/golang:1.16 | ||
|
||
ARG DAPPER_HOST_ARCH | ||
ENV ARCH $DAPPER_HOST_ARCH | ||
|
||
RUN zypper -n rm container-suseconnect && \ | ||
zypper -n install git curl docker gzip tar wget awk zip | ||
|
||
# install goimports | ||
RUN GO111MODULE=on go get golang.org/x/tools/cmd/[email protected] | ||
|
||
## install golangci-lint | ||
RUN if [ "${ARCH}" = "amd64" ]; then \ | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.44.0; \ | ||
fi | ||
|
||
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS | ||
ENV DAPPER_SOURCE /go/src/github.com/harvester/terraform-provider-harvester | ||
ENV DAPPER_OUTPUT ./bin ./dist | ||
ENV DAPPER_DOCKER_SOCKET true | ||
ENV HOME ${DAPPER_SOURCE} | ||
|
||
WORKDIR ${DAPPER_SOURCE} | ||
ENTRYPOINT ["./scripts/entry"] | ||
CMD ["ci"] |