github.com/looshlee/cilium@v1.6.12/examples/kubernetes-grpc/Dockerfile (about)

     1  FROM ubuntu:18.04 as builder
     2  
     3  # Install dependencies
     4  ENV DEBIAN_FRONTEND=noninteractive
     5  RUN apt-get update && apt-get install -y \
     6      software-properties-common
     7  RUN add-apt-repository universe
     8  RUN apt-get update && apt-get install -y \
     9      apache2 \
    10      curl \
    11      git \
    12      libapache2-mod-php7.2 \
    13      php7.2 \
    14      php7.2-mysql \
    15      python3.4 \
    16      python3-pip
    17  RUN pip3 install grpcio grpcio-tools
    18  WORKDIR /tmp
    19  RUN git clone -b v1.7.0 https://github.com/grpc/grpc
    20  COPY cloudcity.proto /tmp/grpc/examples/protos
    21  RUN mkdir -p /tmp/grpc/examples/python/cloudcity
    22  COPY cc_door_client.py /tmp/grpc/examples/python/cloudcity
    23  COPY cc_door_server.py /tmp/grpc/examples/python/cloudcity
    24  WORKDIR /tmp/grpc/examples/python/cloudcity
    25  RUN python3 -m grpc_tools.protoc \
    26      -I../../../examples/protos --python_out=. \
    27      --grpc_python_out=. \
    28      ../../../examples/protos/cloudcity.proto
    29  
    30  FROM ubuntu:18.04
    31  RUN apt-get update \
    32      && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --no-install-recommends \
    33  	&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    34      python3 \
    35      python3-pip \
    36      && pip3 install grpcio grpcio-tools \
    37  	&& apt-get clean \
    38  	&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
    39  COPY --from=builder /tmp/grpc/examples/python/cloudcity /cloudcity