Closed nohorbee closed 2 years ago
Could you show me the working directory where your Dockerfile is located ?
Sure
drwxr-xr-x 10 nohorbee staff 320B Sep 20 14:30 .
drwxr-xr-x 5 nohorbee staff 160B Sep 20 14:44 ..
-rw-r--r-- 1 nohorbee staff 214B Sep 20 14:21 .env
-rw-r--r-- 1 nohorbee staff 417B Sep 20 14:21 Dockerfile
-rw-r--r-- 1 nohorbee staff 774B Sep 20 14:21 Dockerfile.prod
drwxr-xr-x 3 nohorbee staff 96B Sep 20 14:21 config
-rw-r--r-- 1 nohorbee staff 1.5K Sep 20 14:21 docker-compose.yml
drwxr-xr-x 17 nohorbee staff 544B Sep 20 14:21 node_modules
-rw-r--r-- 1 nohorbee staff 4.3K Sep 20 14:21 package-lock.json
-rw-r--r-- 1 nohorbee staff 1.8K Sep 20 14:30 package.json
As you can see, the package json creation time is 9 minutes after the rest of the files, since I created it manually.
Additionally (just in case this information helps), when I created the the project with npx @strapi-community/dockerize
and entered the project name, it was created at the folder I was located instead of the one created by the scaffolder.
Please, let me know if you want me try to fix this
Sure
drwxr-xr-x 10 nohorbee staff 320B Sep 20 14:30 . drwxr-xr-x 5 nohorbee staff 160B Sep 20 14:44 .. -rw-r--r-- 1 nohorbee staff 214B Sep 20 14:21 .env -rw-r--r-- 1 nohorbee staff 417B Sep 20 14:21 Dockerfile -rw-r--r-- 1 nohorbee staff 774B Sep 20 14:21 Dockerfile.prod drwxr-xr-x 3 nohorbee staff 96B Sep 20 14:21 config -rw-r--r-- 1 nohorbee staff 1.5K Sep 20 14:21 docker-compose.yml drwxr-xr-x 17 nohorbee staff 544B Sep 20 14:21 node_modules -rw-r--r-- 1 nohorbee staff 4.3K Sep 20 14:21 package-lock.json -rw-r--r-- 1 nohorbee staff 1.8K Sep 20 14:30 package.json
As you can see, the package json creation time is 9 minutes after the rest of the files, since I created it manually. Additionally (just in case this information helps), when I created the the project with
npx @strapi-community/dockerize
and entered the project name, it was created at the folder I was located instead of the one created by the scaffolder.Please, let me know if you want me try to fix this
But the tool doesn't scaffold out a strapi project, you need a strapi project then run the tool to dockerize it.
Will close this issue for now since it's the way you set it up. Will try make it a bit clearer for user you need to run it IN a strapi project not use it to create one.
🐛 Bug Report
package.json file is not in my filesystem ->
docker compose up --build
fails when running npm install🤷♀️ What did you do
I ran
npx @strapi-community/dockerize
thendocker compose up --build
⛔️ Error log
🕵️♀️ Stack trace