Dockerfile with PHP and NodeJS
DockerfileCopy to clipboard 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.ymlCopy to clipboard version: "3.8"
services:
app:
build: .
image: app
ports:
- 9000
volumes: