Skip to content

Commit

Permalink
add scan DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Aug 16, 2024
1 parent 4204804 commit 5fe682b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions server/deploy/scan/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.18 as builder

ENV GSHARK_CONFIG=config.docker.yaml
WORKDIR /go/src/github.com/madneal/gshark/server
COPY . .

RUN go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& go env -w CGO_ENABLED=0 \
&& go env \
&& go mod tidy \
&& go build -o gshark .

FROM alpine:latest

LABEL MAINTAINER="root@madneal.com"

WORKDIR /go/src/github.com/madneal/gshark/server

COPY --from=0 /go/src/github.com/madneal/gshark/server/gshark ./
COPY --from=0 /go/src/github.com/madneal/gshark/server/resource ./resource/
COPY --from=0 /go/src/github.com/madneal/gshark/server/config.docker.yaml ./

ENTRYPOINT ./gshark scan

0 comments on commit 5fe682b

Please sign in to comment.