How to run Nx Server in Docker

Follow

Comments

9 comments

  • Avatar
    Pieter Viljoen

    Will you be providing a binary version in e.g. docker hub?

    This means you will have more control over the quality since you will be controlling the base image, and as users we can rely on you to update whenever the base or the app changes.

    Will you / DW be providing a DW Watchdog version of code / docker hub?

    0
    Comment actions Permalink
  • Avatar
    Evgeny Balashov

    Hi Pieter, sorry for the delay with the answer.

     

    This package is fully compatible with all Powered-by-Nx products, so you can use it as-is, or modify the way you want if needed.

    We chose not to distribute pre-built images for now because then we would have to create images for every monthly patch for all Powered-by-Nx products. We do consider doing that in the future when Docker will become more mainstream for us.

     

    Pieter, can you please share your user story? What are the requirements in your project?

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    "because then we would have to create images for every monthly patch"

    Exactly, that is what users of commercial containers expect. Why would every user need to setup a CI/CD when you are the ISV and you can automate such deployments? When the base changes the pipeline automatically builds and publishes (e.g. if you use docker hub), when you change versions, you kick the build, in all cases users get the option of deploying the new "latest", manually or automatically. You would then use tags to separate versions, e.g. "latest", "nightly", "beta", etc. Oh, and also please publish builds for Nx and DWSpectrum, I am in the US and I have to use DWSpectrum licenses.

    My story, I run all my home's automation in docker, automatically updated whenever the container author or base updates, except for DWspectrum, where I have to run a VM, and manually configure updates, and the VM consumes more resources than necessary. 

    1
    Comment actions Permalink
  • Avatar
    Evgeny Balashov

    Thank you for the feedback!

    You are right, that we should do it, but I don't know when will we be able to get to it.

    With the Docker package, we provide building the container is a one-line command. Will it help with your DWSpectrum deployments until we implement better support?

     

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    I've been looking at your docker implementation, and the biggest issue is that you are using systemd inside docker, as I've been discovering, this is problematic, and is generally discouraged.

    You seem to be running two services, would you consider changing the installer to not use systemd, and allow the docker author to start the single app on demand?

    E.g. I do not want the container to run as root, I want to use e.g. a LSIO base image, and specify the user and group id to use, such that the volumes I map have the right permissions, or use --user and run under the specified account, without needing to to do the systemd dance and mappings.

    Another question, why are you deleting the timer entries, could you document all the actions you take in the docker file to describe why you do what you do?

    I found the shell scripts to not be of any use in a simpler CI/CD, as I need the docker file to do all the work, I think many other users may be in a similar situation, e.g. https://github.com/ptr727/DWSpectrum/blob/master/Dockerfile

    As for systemd, see here for a "hack" that is required to run in LSIO: https://github.com/thehomerepot/nxwitness/blob/master/Dockerfile

    Now, again, if you provided a working image, that can run under my desired UID/GID/TZ, great, but since you don't, we need to get it working in a reasonably safe and useful way, and systemd in docker, not so much.

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    I notice that gdb is used for crash handling but it is not installed, it is not explicitly installed in dockerfile, and it is not included in the dependencies in the deb package. If gdb is used in docker, please install it.

     

    Please make it easy to trigger on new builds, and download a "latest" build? Today I need to either manually keep track of versions, or I need to parse the cloud download page. (e.g. https://dwspectrum.digital-watchdog.com/download/linux)

    E.g. a latest JSON file that contains the version and a direct download link, that I would then parse for current version information and a download link, or a latest that will redirect to the latest version file. I could then create a trigger to automatically rebuild when your version changes.

    0
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Pieter,

    Regarding:

    "Please make it easy to trigger on new builds, and download a "latest" build?"

    When we release a new version of Nx Witness, we do initially publish it on my.networkoptix.com and we will make it discoverable to all internet-connected systems and the user gets the option to accept or decline the latest version. 

    Besides the official release, we also publish monthly patches. These patches aren't meant to update a system unless our support team advises you to do so or when you like to use the latest and greatest version but are also willing to accept that a monthly patch isn't as well tested as a released version. These monthly patches aren't made available for discovery and only can be updated manually. 

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    In a docker world the container should never update itself. The container publisher should publish a tag schema, that is representative of the product releases.

    E.g. "latest" could be the latest public release, "beta" could be the next version, "1.2.3.4" would be the specific build number.

    The deployment pipeline would then build a container, with the specific tags, whenever a new build is available. the user of the container would decide if they want to use a dynamic build, e.g. "latest", or a specific version, e.g. "1.2.3.4".

    The methods you describe to become aware of a new build require a human to do something, and the web page scraping required to find the build number and version number is prone to break whenever you change the page layout. So, not worth implementing for me, if a simpler more reliable way is not available.

    0
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Pieter,

    Thank you for the feedback. This is really appreciated.

    I do not have any experience with Docker and therefore I misinterpreted your question but I was corrected by a colleague. I will provide the feedback back to our developer team. 

    The Docker option is new, and there are some changes to be done in our software to fulfill your request. At this stage, it is strongly dependant on the number of Docker users and developer resources and therefore I can't provide you any timeline when and if it becomes available at this moment.  

    0
    Comment actions Permalink

Please sign in to leave a comment.