mirror of
https://github.com/niusmallnan/steve.git
synced 2025-06-28 15:36:54 +00:00
Update dockerfile/makefile for local dev
This commit is contained in:
parent
cc1e4e52a0
commit
1e5214b47e
@ -1,9 +1,10 @@
|
|||||||
# syntax = docker/dockerfile:experimental
|
# syntax = docker/dockerfile:experimental
|
||||||
FROM golang:1.12.7 as build
|
FROM golang:1.13.4 as build
|
||||||
COPY go.mod go.sum main.go /src/
|
COPY go.mod go.sum main.go /src/
|
||||||
COPY vendor /src/vendor/
|
COPY vendor /src/vendor/
|
||||||
COPY pkg /src/pkg/
|
COPY pkg /src/pkg/
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
#RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
RUN \
|
||||||
cd /src && \
|
cd /src && \
|
||||||
CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /steve -mod=vendor
|
CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /steve -mod=vendor
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -2,7 +2,7 @@ build:
|
|||||||
docker build -t steve .
|
docker build -t steve .
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
docker run $(DOCKER_ARGS) --rm -p 8989:8080 -it -v ${HOME}/.kube:/root/.kube steve
|
docker run $(DOCKER_ARGS) --rm -p 8989:8080 -it -v ${HOME}/.kube:/root/.kube steve --https-listen-port 0
|
||||||
|
|
||||||
run-host: build
|
run-host: build
|
||||||
docker run $(DOCKER_ARGS) --net=host --uts=host --rm -it -v ${HOME}/.kube:/root/.kube steve --kubeconfig /root/.kube/config --listen-address :8989
|
docker run $(DOCKER_ARGS) --net=host --uts=host --rm -it -v ${HOME}/.kube:/root/.kube steve --kubeconfig /root/.kube/config --http-listen-port 8989 --https-listen-port 0
|
||||||
|
Loading…
Reference in New Issue
Block a user