glocore
glocore

Reputation: 2164

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?

Upvotes: 0

Views: 185

Answers (1)

Patrik Kelemen
Patrik Kelemen

Reputation: 169

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

Upvotes: 1

Related Questions