From Spring Microservices in Action book: I am trying to use the Docker Maven Plugin to build a docker image for deploy a Java microservice as Docker container to the cloud.
Dockerfile:
FROM openjdk:8-jdk-alpine
RUN mkdir -p /usr/local/configserver
ADD jce_policy-8.zip /tmp/
RUN unzip /tmp/jce_policy-8.zip && \
rm /tmp/jce_policy-8.zip && \
yes | cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
ADD @[email protected] /usr/local/configserver/
ADD run.sh run.sh
RUN chmod +x run.sh
CMD ./run.sh
Output related to step 4 in Dockerfile:
... ---> Using cache ---> dd33d4c12d29 Step 4/8 : RUN unzip /tmp/jce_policy-8.zip && rm /tmp/jce_policy-8.zip && yes | cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/ ---> Running in 1071273ceee5 Archive: /tmp/jce_policy-8.zip unzip: short read
Why do I get unzip: short read
when I try to build the image?
read()
syscall was invoked, but less information than requested was returned. Now, that can happen completely legitimately, and software that doesn't do anotherread()
call to try to get more content (which the standard C library will automate) is buggy, but as an initial question -- is your file really intact and as long as it should be? – Incurrent