Skip to content

Commit

Permalink
Merge pull request #3 from 5GSEC/dockerfilefix
Browse files Browse the repository at this point in the history
fixed dockerfile issue
  • Loading branch information
nam-jaehyun authored Mar 8, 2024
2 parents aa37a4e + fd332ca commit eba964a
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
go.work
go.work.sum
2 changes: 1 addition & 1 deletion sentryflow/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Builder

FROM golang:1.19-alpine3.17 as builder
FROM golang:1.22.0-alpine3.19 as builder

RUN apk --no-cache update
RUN apk add --no-cache git clang llvm make gcc protobuf make
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@

### Builder

FROM golang:1.19-alpine3.17 as builder
FROM golang:1.22.0-alpine3.19 as builder

RUN apk --no-cache update
RUN apk add --no-cache git clang llvm make gcc protobuf
RUN go install github.com/golang/protobuf/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

RUN mkdir /app
RUN mkdir /protobuf

WORKDIR /protobuf

COPY /protobuf .
RUN go mod tidy
RUN make build

WORKDIR /app

WORKDIR /app
COPY /sentryflow-clients/log-client .

RUN go install github.com/golang/protobuf/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
RUN go mod tidy
RUN go build -o log-client

### Make executable image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@

### Builder

FROM golang:1.19-alpine3.17 as builder
FROM golang:1.22.0-alpine3.19 as builder

RUN apk --no-cache update
RUN apk add --no-cache git clang llvm make gcc protobuf
RUN go install github.com/golang/protobuf/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

RUN mkdir /app
RUN mkdir /protobuf

WORKDIR /protobuf

COPY /protobuf .
RUN go mod tidy
RUN make build

WORKDIR /app

COPY /sentryflow-clients/mongo-client .

RUN go install github.com/golang/protobuf/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

RUN go build -o mongo-client

### Make executable image
Expand Down
10 changes: 5 additions & 5 deletions protobuf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/5GSEC/sentryflow/protobuf
go 1.19

require (
google.golang.org/grpc v1.61.1
google.golang.org/protobuf v1.32.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
)
22 changes: 11 additions & 11 deletions protobuf/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY=
google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
2 changes: 1 addition & 1 deletion sentryflow-clients/log-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TAG = v0.1
.PHONY: build

build:
docker build -t $(IMAGE_NAME):$(TAG) -f ./Dockerfile ../../
docker build -t $(IMAGE_NAME):$(TAG) -f ../../Dockerfile.log-client ../../

.PHONY: clean

Expand Down
2 changes: 1 addition & 1 deletion sentryflow-clients/mongo-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TAG = v0.1
.PHONY: build

build:
docker build -t $(IMAGE_NAME):$(TAG) -f ./Dockerfile ../../
docker build -t $(IMAGE_NAME):$(TAG) -f ../../Dockerfile.mongo-client ../../

.PHONY: clean

Expand Down
2 changes: 1 addition & 1 deletion sentryflow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:

.PHONY: image
image:
docker build -t $(IMAGE_NAME):$(TAG) -f ./Dockerfile ../
docker build -t $(IMAGE_NAME):$(TAG) -f ../Dockerfile ../

.PHONY: clean
clean:
Expand Down
2 changes: 0 additions & 2 deletions sentryflow/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/5GSEC/sentryflow

go 1.21

toolchain go1.22.0

replace github.com/5GSEC/sentryflow/protobuf => ../protobuf

require (
Expand Down

0 comments on commit eba964a

Please sign in to comment.