Dockerfile linksjtreminio/node-passenger:10, jtreminio/node-passenger:latest, (Dockerfile)For Node projects that do not require a web server (in local dev mode), you can do the following
FROM jtreminio/node-passenger:10
COPY . /var/www
WORKDIR /var/www
CMD [ "yarn", "run" ]
Then, run the commands to build and run the Docker image:
docker build -t my-node-app .
docker run -it --rm --name my-running-app my-node-app
If you want to use this image without having to write a Dockerfile:
docker run -it --rm \
--name my-running-script \
-v "$PWD":/var/www \
-w /var/www \
jtreminio/node-passenger:10 yarn run
The images are based on phusion/passenger-nodejs which comes with Nginx installed.
The default vhost config listens on port 8080, expects your app's public directory to be located at /var/www/public.
By convention, expected entry point is app.js. If your app uses another file to start change passenger_startup_file app.js; to reflect your settings.
Simply run the following to get started:
docker run -it --rm \
--name my-running-script \
-v "$PWD":/var/www \
-w /var/www \
jtreminio/node-passenger:10
Or use Docker Compose:
version: '3.2'
services:
web:
image: jtreminio/node-passenger:10
ports:
- 8080:8080
volumes:
- $PWD:/var/www
Based on phusion/passenger-nodejs, these images update its installed Node to the latest minor version, and installs yarn as a global package.
Content type
Image
Digest
Size
236.2 MB
Last updated
over 7 years ago
docker pull jtreminio/node-passenger