Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/navishh/nextjs-dockerized

Dockerizing a simple NextJs application
https://github.com/navishh/nextjs-dockerized

docker livecycle nextjs

Last synced: 17 days ago
JSON representation

Dockerizing a simple NextJs application

Awesome Lists containing this project

README

        

**Nextjs Application with Docker**

---

**nextjs project setup (bash & npm):**

1. `npx create-next-app@latest ` #initialize the project
2. `npm install`
3. `npm run dev`

nextjs docs: [https://nextjs.org/docs/app/getting-started/installation](https://nextjs.org/docs/app/getting-started/installation)

#create 3 files named Dockerfile .dockerignore docker-compose.yml

4. `touch Dockerfile .dockerignore docker-compose.yml`
5. `docker compose build`
6. `docker compose up`
7. docker tag ``:`` ``:``

- example: `docker tag dn_img1/dockerized-nextjs:latest navish123/dockerized-nextjs:latest`
8. `docker push :`

- example: `docker push navish123/dockerized-nextjs:latest`
9. `docker run -p 3000:3000 navish123/dockerized-nextjs:latest`

#use the image by following the format

- `docker run -p port_no:port_no :`

[share w your peers to see the progress w Livecycle](https://nextapp-nextjs-dockerized-dev-pr-vbnbubo0.livecycle.run)

**Github repository link:**[nextjs-dockerized github repo link](https://github.com/Navishh/nextjs-dockerized)

**Medium link:** [https://medium.com/@itsuki.enjoy/dockerize-a-next-js-app-4b03021e084d](https://medium.com/@itsuki.enjoy/dockerize-a-next-js-app-4b03021e084d)

**Livecycle link:** [livecycle link](https://livecycle.io/)