MedUnes / nextjs-docker

Next.js template/boilerplate/starting-point for Alpine Linux Container deployments with security in mind!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NextJS and Docker

  • node: v16.17.0
  • npm: 8.19.2
  • rootfs: alpine 3.15
  • docker: 20.10.12, build e91ed57

A note about alpine and node which explains:

RUN apk add --no-cache libc6-compat

Enjoy!

Local

Dev

npm i && npm run dev

Docker Compose

docker-compose up --build

This will build and run your container locally 🚀

Traditional Docker Route

Build your containers for deploys:

MacOS/Linux

./scripts/prod.sh

Windows

./scripts/prod.bat

Now that your container is built, you can test it locally:

docker run -p 3000:3000 nextjs-docker

Now deploy 🚀

About

Next.js template/boilerplate/starting-point for Alpine Linux Container deployments with security in mind!

License:MIT License


Languages

Language:Dockerfile 45.8%Language:JavaScript 39.7%Language:Shell 11.7%Language:Batchfile 2.8%