I want to build my project in AWS with ASP.NET Core 2.2, and since AWS unfortunately does not have their own build image available for that, I'm trying to use the Docker image mcr.microsoft.com/dotnet/core/sdk:2.2.
It was getting stuck on pip install --upgrade awscli
... I think because pip
is not installed on the image. So I've tried to fix that by installing pip
and I am getting this error:
Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: apt-get install python3-dev. Reason: exit status 1
My troubleshooting attempts have included:
- toggling the
Privileged
flag for the CodeBuild Environment - including and not including
sudo
in mybuildspec.yml
commands - trying both
pip
andpip3
Here is my current buildspec.yml
:
version: 0.2
phases:
pre_build:
commands:
- apt-get update --fix-missing
- apt-get install -y apt-transport-https
- apt-get update
- apt-get install python3-dev
- apt-get install python3-pip
- pip3 install --upgrade awscli
- dotnet restore AspNetCoreWebApplication/AspNetCoreWebApplication.csproj
- dotnet restore AspNetCoreWebApplicationTest/AspNetCoreWebApplicationTest.csproj
build:
commands:
.....the rest omitted for brevity......
My question is why is this not working?