protoc-artifacts: Avoid checking out protobuf code

It is a bad idea to check out code into the docker image, as it will be
out-of-date. It is better to have the image just be the environment, and
let any scripts that need source check them out themselves.

This fixes #4419 in that it allows the image to build again, albeit
users would need to use wget to grab the source of the version of
protobuf they wish.
This commit is contained in:
Eric Anderson 2018-03-28 16:58:47 -07:00
parent 7bf47a6b5d
commit 5f052ae7ae
2 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,5 @@ RUN rpm --rebuilddb && yum install -y devtoolset-1.1 \
devtoolset-1.1-libstdc++-devel \
devtoolset-1.1-libstdc++-devel.i686
RUN git clone --depth 1 https://github.com/google/protobuf.git
# Start in devtoolset environment that uses GCC 4.7
CMD ["scl", "enable", "devtoolset-1.1", "bash"]

View File

@ -143,7 +143,11 @@ To run the image:
$ docker run -it --rm=true protoc-artifacts
```
The Protobuf repository has been cloned into ``/protobuf``.
To checkout protobuf (run within the container):
```
$ # Replace v3.5.1 with the version you want
$ wget -O - https://github.com/google/protobuf/archive/v3.5.1.tar.gz | tar xvzp
```
### Tips for deploying on Windows
Under Windows the following error may occur: ``gpg: cannot open tty `no tty':