This template is using pnpm. If you are using a package manager other than pnpm, please replace the pnpm-lock.yaml* part of dev.Dockerfile with the appropriate lock file for your package manager
You need to add the following code to your .npmrc
file:
.npmrc file is in your local root directory
For example, if you use mac OS, you can find it in the following path: /home/[USERNAME]/.npmrc
# .npmrc
public-hoist-pattern[]=*@nextui-org/*
# install dependencies in local
pnpm install
change WORKDIR to your own project name
WORKDIR /home/template => WORKDIR /home/blog
change the service name, container name, and volumes path to your own project name
template:
container_name: "next-nextui"
...
volumes:
- ./:/home/template
- /home/template/node_modules
to
blog:
container_name: "my-blog"
...
volumes:
- ./:/home/blog
- /home/blog/node_modules
# copy .env.example to .env
cp .env.example .env
# install dependencies in local
pnpm install
# open docker desktop
# build and run docker container
docker compose up --build -d
then, have fun with your project!