-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.grpc
More file actions
22 lines (21 loc) · 756 Bytes
/
Dockerfile.grpc
File metadata and controls
22 lines (21 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM rust AS builder
LABEL maintainer="extrawurst"
RUN apt-get update && apt-get install -y protobuf-compiler
WORKDIR /ipsrv
ADD ip2country ./ip2country
ADD ip2country-service ./ip2country-service
ADD ip2country-grpc ./ip2country-grpc
ADD ip2country-bench ./ip2country-bench
ADD Cargo.toml ./Cargo.toml
ADD Cargo.lock ./Cargo.lock
RUN cargo build --release
RUN ls -lh target/release/ip2country-grpc
RUN cp ./target/release/ip2country-grpc ./target/ip2country
FROM ubuntu
LABEL maintainer="extrawurst"
RUN apt-get update && apt-get install -y openssl
WORKDIR /ipsrv
COPY --from=builder /ipsrv/target/ip2country ./
ADD ip2country-service/geo-whois-asn-country-ipv4-num.csv ./
ADD ip2country-service/geo-whois-asn-country-ipv6-num.csv ./
CMD ["./ip2country"]