question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when generating Dockerfile

See original GitHub issue

Describe the problem/bug When executing the build.sh file an error emerges that does not let me create the Dockerimage.

Additional information I have tried to run it with the following .NET versions:

  • 2.1
  • 2.2
  • 3.1

Logs (if applicable)

/usr/local/share/dotnet/sdk/2.1.804/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: El SDK de .NET actual no admite el destino .NET Core 3.1. Use el destino .NET Core 2.1 u otro inferior, o bien una versión del SDK de .NET que admita .NET Core 3.1. [/Users/sokardys/workspace/rookielabs/btcpayserver/BTCPayServer.Data/BTCPayServer.Data.csproj]

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo
  2. Run thebuild.sh file
  3. See error

Expected behavior Dockerimageis generated without errors.

Actual behavior It pops up an error. No Dockerimage is generated

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasDoriercommented, Mar 11, 2020

For example:

# Build btcpayserver
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.164/amd64.Dockerfile
DOCKERFILE="amd64.Dockerfile"
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.164/arm32v7.Dockerfile
[[ "$(uname -m)" == "armv7l" ]] && DOCKERFILE="arm32v7.Dockerfile"
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.164/arm64v8.Dockerfile
[[ "$(uname -m)" == "aarch64" ]] && DOCKERFILE="arm64v8.Dockerfile"
echo "Building btcpayserver/btcpayserver:1.0.3.164"
git clone https://github.com/btcpayserver/btcpayserver btcpayserver
cd btcpayserver
git checkout v1.0.3.164
cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "btcpayserver/btcpayserver:1.0.3.164" .
cd - && cd ..

You can check the relevant dockerfile directly to see how to build each image in details outside of docker if you need to.

On the check and cross marks we link to each dockerfile on https://github.com/btcpayserver/btcpayserver-docker#support

1reaction
Kukkscommented, Mar 2, 2020

@NicolasDorier Maybe I am not expressing well the issue. My end-goal is being able to generate a Dockerfile in the same conditions as https://hub.docker.com/r/btcpayserver/btcpayserver.

What are the steps to successfully execute docker build.

Side note

How can I reach to the point where I can compile these 3 architectural builds?

1. https://github.com/btcpayserver/btcpayserver/blob/master/arm64v8.Dockerfile

2. https://github.com/btcpayserver/btcpayserver/blob/master/arm32v7.Dockerfile

3. https://github.com/btcpayserver/btcpayserver/blob/master/amd64.Dockerfile

Build.sh does not create a docker image.

docker build -f amd64.Dockerfile . is all it takes. No dependency on dotnet either when doing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An error occurs when building docker image from Dockerfile
1 Answer. I found the solution. There is a bug or smth in the docker dotnet environment. It just doesn't work with ImplicitUsings...
Read more >
Docker error while creating container from application ...
I have created a docker base image with my dependencies needed to run my application like Java, Python, VC++ and dotnet.
Read more >
'docker build' error: "failed to solve with frontend dockerfile. ...
I was having the "failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error...
Read more >
Docker: “build” Requires 1 Argument Error
In this section, first, we'll create a sample Dockerfile to reproduce the error and then use different approaches to resolve it.
Read more >
Docker Create Dockerfile error message
I am currently working on a project involving docker at work. I used a Dockerfile and tried the syntax of yours and it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found