-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.node
35 lines (25 loc) · 1 KB
/
Dockerfile.node
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
31
32
33
34
35
# Use a specific Alpine version
FROM golang:1.22.7-alpine
# Set proxy environment variables
# ENV http_proxy="http://host.docker.internal:7890"
# ENV https_proxy="http://host.docker.internal:7890"
# ENV all_proxy="socks5://host.docker.internal:7890"
# Configure Alpine repositories and install dependencies
# RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.19/main" > /etc/apk/repositories
# RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.19/community" >> /etc/apk/repositories
# RUN apk update
RUN apk add --no-cache protoc protobuf-dev make git
# Install protoc-gen-go and protoc-gen-go-grpc
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# Unset proxy environment variables for runtime
# ENV http_proxy=""
# ENV https_proxy=""
# ENV all_proxy=""
# Add protoc plugins to PATH
ENV PATH="$PATH:$(go env GOPATH)/bin"
WORKDIR /app
COPY . .
RUN make debug release
# RUN make release # for release build
EXPOSE 51000-56000