mirror of
https://github.com/Neur0toxine/docker-golang-alpine.git
synced 2024-11-22 04:56: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
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: brew install hadolint
|
||||
- run: hadolint {1.16,1.16-3.13,1.17,1.17-3.13,1.18,1.18-3.13}/Dockerfile
|
||||
- run: |
|
||||
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:
|
||||
- DL3003
|
||||
- DL3018
|
||||
- DL3017
|
||||
- DL4006
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM golang:1.16-alpine3.13
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM golang:1.16-alpine
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM golang:1.17-alpine3.13
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM golang:1.17-alpine
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
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 😅
|
||||
fi; \
|
||||
\
|
||||
wget -O go.tgz.asc "$url.asc"; \
|
||||
wget -O go.tgz "$url"; \
|
||||
wget --progress=dot -O go.tgz.asc "$url.asc"; \
|
||||
wget --progress=dot -O go.tgz "$url"; \
|
||||
echo "$sha256 *go.tgz" | sha256sum -c -; \
|
||||
\
|
||||
# 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"
|
||||
WORKDIR $GOPATH
|
||||
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM golang:1.18-alpine
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache bash make git gcc libc-dev jq curl dumb-init
|
||||
RUN cd /tmp && \
|
||||
RUN set -eux; \
|
||||
apk add --no-cache bash make git gcc libc-dev jq curl dumb-init && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/go-delve/delve && \
|
||||
cd delve && \
|
||||
go install github.com/go-delve/delve/cmd/dlv && \
|
||||
cd .. && \
|
||||
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin && \
|
||||
cd / && \
|
||||
go install github.com/cosmtrek/air@latest && \
|
||||
rm -rf delve && \
|
||||
chmod -R 777 /go
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
Loading…
Reference in New Issue
Block a user