neo icon indicating copy to clipboard operation
neo copied to clipboard

[**Added**] Build `neo-cli` Docker Image

Open cschuchardt88 opened this issue 1 year ago • 8 comments

Description

Now anyone can build there docker image with our neo-cli

Change Log

  • Adds docker image to ghcr.io
  • Added Dockerfile to .neo/docker/neo-cli path
  • Added github action workflow for building image
  • Added deletion of old docker images to save space.

Example

https://github.com/cschuchardt88/neo/pkgs/container/neo-cli

docker pull ghcr.io/cschuchardt88/neo-cli:3.8.0

Test Image locally

docker run --rm -i -t ghcr.io/cschuchardt88/neo-cli:3.8.0 /bin/bash

Docker Desktop

image

Github

image

Type of change

  • [ ] Optimization (the change is only an optimization)
  • [ ] Style (the change is only a code style for better maintenance or standard purpose)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] This change requires a documentation update

How Has This Been Tested?

Locally

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

cschuchardt88 avatar Jun 24 '24 09:06 cschuchardt88

@vncoelho I changed the scope of this PR.

cschuchardt88 avatar Jun 25 '24 01:06 cschuchardt88

wow, it works with github account. But maybe someone should manage the price if the docker image grows big. @steven1227 need NGD to decide if they want it.

Jim8y avatar Jun 25 '24 06:06 Jim8y

I believe the size is around 80mb-100mb compressed. The base image is around 30mb, and with neo-cli is extra 55mb.

cschuchardt88 avatar Jun 25 '24 17:06 cschuchardt88

I removed the dockerfile from src\Neo.CLI. We don't need this anymore. Only platform is x64 currently. Anything else is out of the scope of this PR.

cschuchardt88 avatar Jun 25 '24 17:06 cschuchardt88

The dockerfile there is used for test. If you remove you need to adjust the tests to the new one.

vncoelho avatar Jun 25 '24 18:06 vncoelho

@vncoelho where at are these tests? I checked main.yml.

cschuchardt88 avatar Jun 25 '24 23:06 cschuchardt88

@vncoelho where at are these tests? I checked main.yml.

Indeed it can be removed for now. But better to do in another PR, I am not sure who is currently using this.

vncoelho avatar Jun 26 '24 11:06 vncoelho

@vncoelho Reverted the deletion of the Dockerfile in src\Neo.CLI

cschuchardt88 avatar Jun 26 '24 11:06 cschuchardt88