Dockerfile 861 B

12345678910111213141516171819202122232425
  1. FROM swift:latest
  2. MAINTAINER Tim Burks <timburks@google.com>
  3. ENV PROTOC_VERSION=3.9.1
  4. # Install a few needed packages that aren't in swiftdocker/swift
  5. RUN apt-get -q update \
  6. && apt-get install curl \
  7. && apt-get install libz-dev \
  8. && apt-get install libssl-dev \
  9. && apt-get -q install -y unzip libnghttp2-dev \
  10. && rm -r /var/lib/apt/lists/*
  11. # Install protoc
  12. RUN curl -O -L https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
  13. && unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr \
  14. && rm -rf protoc-${PROTOC_VERSION}-linux-x86_64.zip
  15. # Build and install the swiftgrpc plugin
  16. RUN git clone https://github.com/grpc/grpc-swift \
  17. && cd grpc-swift \
  18. && make \
  19. && cp protoc-gen-swift protoc-gen-swiftgrpc /usr/bin \
  20. && cd / \
  21. && rm -rf grpc-swift