Git Product home page Git Product logo

nicoru's People

Contributors

5enxia avatar davidegalilei avatar fox0430 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nicoru's Issues

Create Distinct type for Image, Repo, Tag, etc

Looking though the code, it may make sense to define distinct types for tags, image ids, etc. Something like:

let 
   Tag = distinct string
   Repo = distinct string
   Image = distinct string
   ImagePath = distinct string
   ImageId = distinct string
   ...

proc `/`(path: string, image: ImageId): ImagePath = ...

Using this pattern of creating distinct types of strings would be easy to use, but allow the compiler to catch cases where "oops, a tag was used when I meant an image". There's a lot of places where various string types could likely get mixed up!

Distinct types would also help prevent a lot of potential security risks by adding known safe internal types from user input strings. Not sure how much of an issue this is currently, but personally I prefer to prevent certain classes of issues where it''s difficult to know if user input strings have been properly sanitized. For example, the repoUrl = fmt"..." type of things might need sanitizing using URLEncode (or the Nim equivalent) to prevent weird URL related issues (or just bugs...).

If you like the idea I might be able to create a PR for it at some point.

SSL support is not available. Cannot connect over SSL

  1. Install nicoru with nimble install nicoru
  2. Run sudo nicoru run archlinux

Expected: command run.

Actual:

$ sudo nicoru run archinux
httpclient.nim(865)      newConnection
Error: unhandled exception: SSL support is not available. Cannot connect over SSL. Compile with -d:ssl to enable. [HttpRequestError]

My setup is Arch Linux on WSL2 on Windows 10.

Crash when run container at first

Log

$ sudo ./nicoru run nginx

Create container: 61af1e7679853bebdc373ac0
/home/fox/git/nicoru/src/nicoru.nim(8) nicoru
/home/fox/git/nicoru/src/pkgs/cmdparse.nim(388) checkArgments
/home/fox/git/nicoru/src/pkgs/cmdparse.nim(255) cmdRun
/home/fox/git/nicoru/src/pkgs/container.nim(565) runContainer
/home/fox/git/nicoru/src/pkgs/container.nim(371) execContainer
/home/fox/git/nicoru/src/pkgs/network.nim(728) initNicoruNetwork
/home/fox/git/nicoru/src/pkgs/network.nim(575) createBridge
/home/fox/.choosenim/toolchains/nim-1.6.0/lib/pure/options.nim(194) get
Error: unhandled exception: Can't obtain a value from a `none` [UnpackDefect]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.