You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/01/05 03:42:43 UTC
[GitHub] [incubator-inlong] shink commented on a change in pull request #2101: [INLONG-2097][Agent] change wget command
shink commented on a change in pull request #2101:
URL: https://github.com/apache/incubator-inlong/pull/2101#discussion_r778527521
##########
File path: inlong-tubemq/tubemq-docker/tubemq-build/Dockerfile
##########
@@ -21,8 +21,8 @@ FROM gcc:5.4.0 as protobuf
RUN apt-get update && apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/
ARG PROTOBUF_VERSION=2.5.0
-RUN wget -O "/tmp/protobuf-${PROTOBUF_VERSION}.zip" "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.zip" \
- && unzip "/tmp/protobuf-${PROTOBUF_VERSION}.zip" -d "/opt/" \
+RUN curl -LOk "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.zip" \
+ && unzip "protobuf-${PROTOBUF_VERSION}.zip" -d "/opt/" \
&& cd /opt/protobuf-${PROTOBUF_VERSION} \
&& ./configure --prefix=/usr && make && make DESTDIR=/protobuf/ install \
&& rm -f "/tmp/protobuf-${PROTOBUF_VERSION}.zip"
Review comment:
It seems that the zip file is download, but not deleted after unzipping.
```suggestion
RUN curl -Lk "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.zip" \
-o "/tmp/protobuf-${PROTOBUF_VERSION}.zip"
&& unzip "/tmp/protobuf-${PROTOBUF_VERSION}.zip" -d "/opt/" \
&& cd /opt/protobuf-${PROTOBUF_VERSION} \
&& ./configure --prefix=/usr && make && make DESTDIR=/protobuf/ install \
&& rm -rf "/tmp/*"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org