BugTracker icon indicating copy to clipboard operation
BugTracker copied to clipboard

Can't build docker

Open thirdwheel opened this issue 3 years ago • 2 comments

This is the result I get when trying to build the web ui:

the_user@server:~/BugTracker$ ln -s WebUI.Dockerfile Dockerfile
the_user@server:~/BugTracker$ docker build . -t bug.tracker.ui
Sending build context to Docker daemon  3.355MB
Step 1/24 : FROM microsoft/dotnet:2.1-sdk-alpine AS build
pull access denied for microsoft/dotnet, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Similar if I try to build the API:

the_user@server:~/BugTracker$ ln -s API.Dockerfile Dockerfile
the_user@server:~/BugTracker$ docker build . -t bug.tracker.api
Sending build context to Docker daemon  3.355MB
Step 1/28 : FROM microsoft/dotnet:2.1-sdk-alpine AS build
pull access denied for microsoft/dotnet, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Running Docker 20.10.11 on Alpine Linux 3.14.3

thirdwheel avatar Nov 07 '22 22:11 thirdwheel

And yes, logging in produces the same result

thirdwheel avatar Nov 07 '22 22:11 thirdwheel

Ok so changing the FROM definitions to point to where dotnet lives now gets the WebUI to build, but the API fails at this point:

/usr/share/dotnet/sdk/3.1.424/Microsoft.Common.CurrentVersion.targets(4682,5): error MSB3030: Could not copy the file "/build/bugTracker.Core.Api/bugTracker.db" because it was not found. [/build/bugTracker.Core.Api/bugTracker.Core.Api.csproj]
    35 Warning(s)
    1 Error(s)

Time Elapsed 00:00:25.87
The command '/bin/sh -c dotnet build ./bugTracker.Core.Api/bugTracker.Core.Api.csproj --configuration Release --no-restore' returned a non-zero code: 1

Creating a SQLite database with a single table in it fixes this issue:

sqlite3 bugTracker.Core.Api/bugTracker.db "CREATE TABLE dual (x varchar);"

thirdwheel avatar Nov 07 '22 22:11 thirdwheel