mirror of
https://github.com/luzifer-docker/personal-dns.git
synced 2024-12-20 20:51:18 +00:00
Ensure readonly-modules when installing tools
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3f5e4a5a4a
commit
8b499e93f0
2 changed files with 23 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
||||||
FROM golang:alpine as builder
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
@ -9,10 +11,7 @@ RUN set -ex \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
make \
|
make \
|
||||||
&& go get -v \
|
&& bash /src/gotools.sh \
|
||||||
github.com/Luzifer/bind-log-metrics \
|
|
||||||
github.com/Luzifer/named-blacklist \
|
|
||||||
github.com/Luzifer/rootzone \
|
|
||||||
&& rootzone >named.stubs \
|
&& rootzone >named.stubs \
|
||||||
&& make blacklist
|
&& make blacklist
|
||||||
|
|
||||||
|
|
20
gotools.sh
Normal file
20
gotools.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
packages=(
|
||||||
|
github.com/Luzifer/bind-log-metrics
|
||||||
|
github.com/Luzifer/named-blacklist
|
||||||
|
github.com/Luzifer/rootzone
|
||||||
|
)
|
||||||
|
|
||||||
|
for pkg in "${packages[@]}"; do
|
||||||
|
targetdir="/go/src/${pkg}"
|
||||||
|
|
||||||
|
# Get sources
|
||||||
|
git clone "https://${pkg}.git" "${targetdir}"
|
||||||
|
|
||||||
|
# Go to directory and install util
|
||||||
|
pushd "${targetdir}"
|
||||||
|
go install -mod=readonly
|
||||||
|
popd
|
||||||
|
done
|
Loading…
Reference in a new issue