Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

ADD'ing a zip file during a docker build corrupts the ADD'ed file

$
0
0

I am trying to upload a Python .whl file (essentially a .zip file) while building a Dockerfile image:

FROM python:3.12-slim-bookwormRUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install unzipADD download/pypackage.whl /tmp/pypackage.whlRUN unzip -t /tmp/pypackage.whl

The docker build fails with this:

error [/tmp/pypackage.whl]: missing 13 bytes in zipfile

But if I run unzip -t on the local version of the file I get no error:

$ unzip -t download/pypackage.whlNo errors detected in compressed data of download/pypackage.whl.

How do I fix this?


Viewing all articles
Browse latest Browse all 136

Trending Articles