Issue running dockerfile to create an image based on ubuntu on windows server 2109 as host

Expected behavior

I have an dockerfile tocreate an image based on Ubuntu where I want to install python and ansible using this script:

FROM ubuntu:latest

RUN apt-get update
&& apt install -y
sudo
ca-certificates
curl
jq
git
iputils-ping
libcurl4
libunwind8
netcat
python3
python3-pip
gcc
git
wget
python3-dev

RUN pip3 install ‘ansible’

Actual behavior

Updating certificates in /etc/ssl/certs…
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d…
done.
The command ‘/bin/sh -c apt-get update && apt install -y sudo ca-certificates curl jq git iputils-ping libcurl4 libunwind8 netcat python3 python3-pip gcc git wget python3-dev’ returned a non-zero code: 4294967295

Information

I installed my docker using powershell on windows server 2019 Standard_D4s_v3 (Azure VM) where I run the dockerfile

Thank you for you help

Your command concatenates a bunch of “apt” commands. I would suggest trying to split it into individual commands to debug which is causing the error.

RUN apt-get update
RUN apt install -y sudo
RUN apt install -y ca-certificates