Trying to build an image with Powershell and pip and then run a Powershell script which calls a python package inside:
> docker build --file gallery-dl.dockerfile --tag psu .
[+] Building 0.6s (9/9) FINISHED
=> [internal] load build definition from gallery-dl.dockerfile 0.0s
=> => transferring dockerfile: 413B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for mcr.microsoft.com/powershell:7.3.0-preview.3-ubunt 0.2s
=> [internal] load build context 0.0s
=> => transferring context: 36B 0.0s
=> [1/4] FROM mcr.microsoft.com/powershell:7.3.0-preview.3-ubuntu-focal-20220318@s 0.0s
=> CACHED [2/4] RUN apt-get update && apt-get -qq -y install curl ca-certifica 0.0s
=> CACHED [3/4] RUN pip3 install https://github.com/mikf/gallery-dl/archive/master 0.0s
=> [4/4] COPY gallery-dl.ps1 /mydir/ 0.1s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:6bd7be9979190bf2993e5473265284883b0c154c1e62f5bb27d74c0 0.0s
=> => naming to docker.io/library/psu 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
But getting the following error:
> docker run -it --rm --name psutest psu
standard_init_linux.go:228: exec user process caused: exec format error
My Dockerfile:
FROM mcr.microsoft.com/powershell:7.3.0-preview.3-ubuntu-focal-20220318
RUN apt-get update && \
apt-get -qq -y install curl ca-certificates python3-pip
RUN pip3 install https://github.com/mikf/gallery-dl/archive/master.zip https://github.com/yt-dlp/yt-dlp/archive/master.zip
COPY gallery-dl.ps1 /mydir/
ENTRYPOINT ["/mydir/gallery-dl.ps1"]
What am I doing wrong? The script runs just fine when run directly on my computer.