mirror of
https://github.com/Neur0toxine/docker-golang-alpine.git
synced 2024-11-22 13:06:06 +03:00
update linter rules & install air via go install
This commit is contained in:
parent
1bd381c955
commit
f9122d7eee
6
.github/workflows/hadolint.yml
vendored
6
.github/workflows/hadolint.yml
vendored
@ -7,5 +7,7 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: brew install hadolint
|
- run: |
|
||||||
- run: hadolint {1.16,1.16-3.13,1.17,1.17-3.13,1.18,1.18-3.13}/Dockerfile
|
brew install hadolint
|
||||||
|
hadolint {1.16,1.16-3.13,1.17,1.17-3.13,1.18}/Dockerfile
|
||||||
|
hadolint --ignore=DL3059 --ignore=SC2155 1.18-3.13/Dockerfile
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
ignored:
|
ignored:
|
||||||
|
- DL3003
|
||||||
- DL3018
|
- DL3018
|
||||||
- DL3017
|
- DL3017
|
||||||
|
- DL4006
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
FROM golang:1.16-alpine3.13
|
FROM golang:1.16-alpine3.13
|
||||||
WORKDIR /
|
RUN set -eux; \
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
RUN cd /tmp && \
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
FROM golang:1.16-alpine
|
FROM golang:1.16-alpine
|
||||||
WORKDIR /
|
RUN set -eux; \
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
RUN cd /tmp && \
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
FROM golang:1.17-alpine3.13
|
FROM golang:1.17-alpine3.13
|
||||||
WORKDIR /
|
RUN set -eux; \
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
RUN cd /tmp && \
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
FROM golang:1.17-alpine
|
FROM golang:1.17-alpine
|
||||||
WORKDIR /
|
RUN set -eux; \
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
RUN cd /tmp && \
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
@ -48,8 +48,8 @@ RUN set -eux; \
|
|||||||
# the precompiled binaries published by Go upstream are not compatible with Alpine, so we always build from source here 😅
|
# the precompiled binaries published by Go upstream are not compatible with Alpine, so we always build from source here 😅
|
||||||
fi; \
|
fi; \
|
||||||
\
|
\
|
||||||
wget -O go.tgz.asc "$url.asc"; \
|
wget --progress=dot -O go.tgz.asc "$url.asc"; \
|
||||||
wget -O go.tgz "$url"; \
|
wget --progress=dot -O go.tgz "$url"; \
|
||||||
echo "$sha256 *go.tgz" | sha256sum -c -; \
|
echo "$sha256 *go.tgz" | sha256sum -c -; \
|
||||||
\
|
\
|
||||||
# https://github.com/golang/go/issues/14739#issuecomment-324767697
|
# https://github.com/golang/go/issues/14739#issuecomment-324767697
|
||||||
@ -105,13 +105,15 @@ ENV PATH $GOPATH/bin:$PATH
|
|||||||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
||||||
WORKDIR $GOPATH
|
WORKDIR $GOPATH
|
||||||
|
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
RUN set -eux; \
|
||||||
RUN cd /tmp && \
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
FROM golang:1.18-alpine
|
FROM golang:1.18-alpine
|
||||||
WORKDIR /
|
RUN set -eux; \
|
||||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||||
RUN cd /tmp && \
|
cd /tmp && \
|
||||||
git clone https://github.com/go-delve/delve && \
|
git clone https://github.com/go-delve/delve && \
|
||||||
cd delve && \
|
cd delve && \
|
||||||
go install github.com/go-delve/delve/cmd/dlv && \
|
go install github.com/go-delve/delve/cmd/dlv && \
|
||||||
cd .. && \
|
cd / && \
|
||||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
go install github.com/cosmtrek/air@latest && \
|
||||||
rm -rf delve && \
|
rm -rf delve && \
|
||||||
chmod -R 777 /go
|
chmod -R 777 /go
|
||||||
|
WORKDIR /
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
Loading…
Reference in New Issue
Block a user