/Build-node

for build on image

Primary LanguageDockerfile

Isolate build node containers

Docker Image

docker build -t ghcr.io/danielrondongarcia/build-node .

Now, run the following command to create and run a container based on this image, mapping the /build folder of the container to the current host folder:

docker run --rm -it -v ${pwd}:/build ghcr.io/danielrondongarcia/build-node:latest node -v
docker run --rm -it -v ${pwd}:/build ghcr.io/danielrondongarcia/build-node:latest npm install
docker attach $(docker ps -l -q)

For Next js

docker run --rm -it -v ${pwd}:/build ghcr.io/danielrondongarcia/build-node:latest npx create-next-app nextjs-typescript-starter --example "https://github.com/vercel/nextjs-postgres-auth-starter"

With port

docker run --rm -it -p 3000:3000 -v ${pwd}:/build ghcr.io/danielrondongarcia/build-node:latest npm run dev