Skip to content

Using Docker

Meir Noordermeer edited this page May 2, 2017 · 5 revisions

Please setup a config.json before using ap-npm with Docker

Installing from Docker Cloud

Pull image

docker pull meirbon/ap-npm

Start server

docker run -p <port>:4444 -v <host-storage-folder>:/ap-npm -d meirbon/ap-npm

Building Docker image from source

Build the image:

docker build -t ap-npm .
Running the docker image

Run the following command to start your image:

docker run -p <port>:4444 -d ap-npm

This will start the ap-npm server on the given port, to test if ap-npm is running:

curl http://localhost:<port> 

should return:

ap-npm is running
Using mounted storage

We recommend to run the ap-npm server using a mounted volume:

docker run -p <port>:4444 -d ap-npm -v <host-storage-dir>:/apnpm

If you ever want to update ap-npm, this will make it easier to migrate data used by ap-npm as it is stored on the host system. Also using your own authentication methods, ssl and your own config file is much easier when using mounted storage.