Dockerfile 753 B

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