Skip to main contentNedix.io

Docker

Dockerfile with PHP and NodeJS

Dockerfile
FROM node:${NODE_VERSION:-17.7.2}-alpine AS node
FROM wodby/php:${PHP_VERSION:-8.1-4.28.4}
COPY --from=node /usr/local/lib/node_modules/ /usr/local/lib/node_modules/
COPY --from=node /usr/local/bin/node /usr/local/bin/
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
RUN ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx

Docker Compose

docker-compose.yml
version: "3.8"
services:
app:
build: .
image: app
ports:
- 9000
volumes: