Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Fix Dockerfile #715

Merged
merged 2 commits into from
Jan 18, 2021
Merged

Fix Dockerfile #715

merged 2 commits into from
Jan 18, 2021

Conversation

gsmachado
Copy link
Contributor

@gsmachado gsmachado commented Jan 14, 2021

We need to pay more attention when the Dockerfile is modified. It's the second time I fix changes that are made in this file, which seems that is modified without any tests. Maybe I can add some Dockerfile tests in the future.

In the PR I solved the following:

Step 1/12 : FROM mcr.microsoft.com/dotnet/sdk:5.0.0 AS Build
ERROR: Service 'build-neo-cli' failed to build: manifest for mcr.microsoft.com/dotnet/sdk:5.0.0 not found: manifest unknown: manifest tagged by "5.0.0" is not found

As stated here, the best way to tag is 5.0 or specific ones, like 5.0.102.

Also, I solved something else:

When we use mcr.microsoft.com/dotnet/runtime:5.0 to run the neo-cli.dll, the following message appeared:

root@eb171729224b:/neo-cli# dotnet neo-cli.dll -r
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=debian.10-x64
root@eb171729224b:/neo-cli#

That's why I changed and switched to mcr.microsoft.com/dotnet/aspnet:5.0.

@erikzhang
Copy link
Member

@neo-project/ngd-shanghai Anyone can test it?

@Tommo-L
Copy link
Contributor

Tommo-L commented Jan 14, 2021

We'll test it.

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, Guil.

@chenzhitong
Copy link
Member

chenzhitong commented Jan 15, 2021

I followed this procedure to install docker in Windows 10 Home Edition.

PS C:\Users\chenzhitong\neo-node> docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.7
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:14:16 2020
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true
error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: The system cannot find the file specified.

image

After successful installation, build neo-node into docker will report an error, does anyone know what I did wrong?

PS C:\Users\chenzhitong> git clone https://github.com/AxLabs/neo-node
Cloning into 'neo-node'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 1906 (delta 16), reused 17 (delta 10), pack-reused 1869
Receiving objects: 100% (1906/1906), 633.01 KiB | 427.00 KiB/s, done.
Resolving deltas: 100% (1243/1243), done.
PS C:\Users\chenzhitong> cd neo-node
PS C:\Users\chenzhitong\neo-node> git branch fix-dockerfile

PS C:\Users\chenzhitong\neo-node> docker build -t neo-cli .
error during connect: This error may indicate that the docker daemon is not running.: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=neo-cli&target=&ulimits=null&version=1: open //./pipe/docker_engine: The system cannot find the file specified.
PS C:\Users\chenzhitong\neo-node>

😥
Or, I think the Readme should have been more detailed.

@gsmachado
Copy link
Contributor Author

@chenzhitong I can't help with Windows, but you could read this issue.

@superboyiii
Copy link
Member

superboyiii commented Jan 15, 2021

I build it successfully. (Windows)
image

@gsmachado
Copy link
Contributor Author

@superboyiii @chenzhitong the build works, it's all fine. And I believe that all functions of the node are also working -- because I could run a testnet with this Dockerfile.

@erikzhang
Copy link
Member

This branch is out-of-date with the base branch

@gsmachado
Copy link
Contributor Author

gsmachado commented Jan 18, 2021

@erikzhang Done. Ready to go. 🚀

@superboyiii superboyiii merged commit c667f0d into neo-project:master Jan 18, 2021
@gsmachado gsmachado deleted the fix-dockerfile branch February 3, 2021 12:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants