-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 800 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use an official Golang runtime as a parent image
FROM golang:1.22
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Download and install any required dependencies
RUN go mod download
# Install air
RUN go install github.com/cosmtrek/air@latest
# Install Protobuff compiler
RUN apt-get update
RUN apt install -y protobuf-compiler
# Install Protobuff plugins
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
# Expose port for incoming traffic
EXPOSE 80
EXPOSE 8080
ENTRYPOINT ["air"]