简体   繁体   中英

How do I create a distributable Docker image?

I'd like to build a NodeJS server packaged as an executable, which can then be installed and run on any Linux machine without any pre-requisite dependencies. I was considering packaging it as a Docker image, but that would mean that the user would need Docker to be installed on their system. Is there a way to package a Docker image itself as an executable, so that all the user needs to do is to run an executable file?

With docker NO

The answer for the executable from docker is no.

You can create docker/docker-compose project which you can simply run if you have docker installed.

Without docker YES

But you can still package it without using docker (with the whole nodejs included in the executable).

Look at this link https://www.npmjs.com/package/pkg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM