---
title: "Comment by Jens on \"🐳 Docker with Strapi V4 🌟\" | Hashnode"
description: "Thanks for the tutorial. One thing I do not understand is the following: What&#39;s the point of having the package.json (and package-lock.json ) in /opt/ ? Ins"
url: "https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/62e7ee8a430bd1d04a8476be"
---

[Discussion](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

Comment [🐳 Docker with Strapi V4 🌟](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

[Jens](https://hashnode.com/@jensn)

[Aug 1, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/62e7ee8a430bd1d04a8476be)

Thanks for the tutorial. One thing I do not understand is the following: What's the point of having the `package.json` (and `package-lock.json`) in `/opt/`? Instead of just having it in `/opt/app/` like the rest.

[Simen Daehlin](https://hashnode.com/@eventyret)

[Aug 3, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/62e7ee8a430bd1d04a8476be#reply-62ea33e116f9480a9dac4efb)

So in very simple terms. It's because it minimized attack surface of a container.

Think of it in this scenario. `node_modules` where your web browser / server is running it can be exploited. Meaning I can get access to the container and I can go up the chain.

If it's OUTSIDE, I get fewer exploits and have to go up further again.
