We ship 2 versions of Node.js images: the normal
node:version image and the
The builder variant of those images comes with additional tooling that is needed when you build Node.js apps (such as the build libraries, npm and yarn). For a full list check out their Dockerfile.
- 12 (available for compatibility only, no longer officially supported) -
- 14 Dockerfile (Security Support until April 2023) -
- 16 Dockerfile (Security Support until September 2023) -
- 18 Dockerfile (Security Support until April 2025) -
We stop updating EOL Node.js images usually with the Lagoon release that comes after the officially communicated EOL date: https://nodejs.org/en/about/releases/.
The default exposed port of node containers is port
Persistent storage is configurable in Lagoon, using the
lagoon.type: node-persistent. See the docs for more info
Use the following labels in your docker-compose.yml file to configure it:
lagoon.persistent = use this to define the path in the container to use as persistent storage - e.g. /app/files
lagoon.persistent.size = this to tell Lagoon how much storage to assign this path
If you have multiple services that share the same storage, use this
lagoon.persistent.name = (optional) use this to tell Lagoon to use the storage defined in another named service
```yaml title="docker-compose.yml snippet" node: build: # this configures a build from a Dockerfile in the root folder context: . dockerfile: Dockerfile labels: # tells Lagoon this is a node service, configured with 500MB of persistent storage at /app/files lagoon.type: node-persistent lagoon.persistent: /app/files lagoon.persistent.size: 500Mi ports: # local development only # this exposes the port 3000 with a random local port - find it with docker-compose port node 3000 - "3000" volumes: # local development only # mounts a named volume (files) at the defined path for this service to replicate production - files:/app/files ```
Environment variables are meant to contain common information for the PHP container.
||3000||tells the local development environment on which port we are running|