Skip to content

Commit f2dfa46

Browse files
committed
Add Dockerfile
1 parent 2e9b899 commit f2dfa46

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM golang:1.20-alpine3.18 AS builder
2+
MAINTAINER DeepFence
3+
4+
RUN apk update
5+
RUN apk add make
6+
WORKDIR /go
7+
COPY . compliance
8+
RUN cd compliance && make clean && make
9+
10+
FROM alpine:3.18
11+
MAINTAINER DeepFence
12+
COPY --from=builder /go/compliance/compliance /usr/bin/compliance

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
all: Compliance
1+
all: compliance
22

33
clean:
44
-rm ./compliance
55

6-
Compliance:
6+
compliance:
77
env CGO_ENABLED=0 go build -o compliance -buildvcs=false -v .
88

9-
.PHONY: clean
9+
.PHONY: clean

0 commit comments

Comments
 (0)