docker 실행 에러

#docker-compose -f docker-compose.yml up
명령어 실행하면 아래와 같은 에러가 발생하고 웹 서비스가 제대로 동작하지 않습니다..
해결 방법좀 부탁드려요

Dreamhack          | 2023-11-02 14:44:56,797 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
Dreamhack          | 2023-11-02 14:44:56,799 INFO supervisord started with pid 1
Dreamhack          | 2023-11-02 14:44:57,801 INFO spawned: 'express' with pid 9
Dreamhack          | npm ERR! code ENOENT
Dreamhack          | npm ERR! syscall open
Dreamhack          | npm ERR! path /app/package.json
Dreamhack          | npm ERR! errno -2
Dreamhack          | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
Dreamhack          | npm ERR! enoent This is related to npm not being able to find a file.
Dreamhack          | npm ERR! enoent
Dreamhack          |
Dreamhack          | npm ERR! A complete log of this run can be found in:
Dreamhack          | npm ERR!     /root/.npm/_logs/2023-11-02T14_44_57_949Z-debug.log
Dreamhack          | 2023-11-02 14:44:57,954 INFO exited: express (exit status 254; not expected)
Dreamhack          | 2023-11-02 14:44:58,956 INFO spawned: 'express' with pid 20
Dreamhack          | npm ERR! code ENOENT
Dreamhack          | npm ERR! syscall open
Dreamhack          | npm ERR! path /app/package.json
Dreamhack          | npm ERR! errno -2
Dreamhack          | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
Dreamhack          | npm ERR! enoent This is related to npm not being able to find a file.
Dreamhack          | npm ERR! enoent
Dreamhack          |
Dreamhack          | npm ERR! A complete log of this run can be found in:
Dreamhack          | npm ERR!     /root/.npm/_logs/2023-11-02T14_44_59_096Z-debug.log
Dreamhack          | 2023-11-02 14:44:59,101 INFO exited: express (exit status 254; not expected)
Dreamhack          | 2023-11-02 14:45:01,105 INFO spawned: 'express' with pid 31
Dreamhack          | npm ERR! code ENOENT
Dreamhack          | npm ERR! syscall open
Dreamhack          | npm ERR! path /app/package.json
Dreamhack          | npm ERR! errno -2
Dreamhack          | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
Dreamhack          | npm ERR! enoent This is related to npm not being able to find a file.
Dreamhack          | npm ERR! enoent
Dreamhack          |
Dreamhack          | npm ERR! A complete log of this run can be found in:
Dreamhack          | npm ERR!     /root/.npm/_logs/2023-11-02T14_45_01_252Z-debug.log
Dreamhack          | 2023-11-02 14:45:01,257 INFO exited: express (exit status 254; not expected)
Dreamhack          | 2023-11-02 14:45:04,266 INFO spawned: 'express' with pid 42
Dreamhack          | npm ERR! code ENOENT
Dreamhack          | npm ERR! syscall open
Dreamhack          | npm ERR! path /app/package.json
Dreamhack          | npm ERR! errno -2
Dreamhack          | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
Dreamhack          | npm ERR! enoent This is related to npm not being able to find a file.
Dreamhack          | npm ERR! enoent
Dreamhack          |
Dreamhack          | npm ERR! A complete log of this run can be found in:
Dreamhack          | npm ERR!     /root/.npm/_logs/2023-11-02T14_45_04_415Z-debug.log
Dreamhack          | 2023-11-02 14:45:04,420 INFO exited: express (exit status 254; not expected)
Dreamhack          | 2023-11-02 14:45:05,422 INFO gave up: express entered FATAL state, too many start retries too quickly
#web
작성자 정보
답변 1
avatar
ainsetin
Open Beta Tester

Dockerfile을 자세히 보시면,
COPY private . 이라는 구문을 볼 수 있으실겁니다.
여기서의 private 폴더는 문제 서버를 실제로 구동하기 위해 /app 안에 들어갈 내용입니다.
해당 문제에서는 주어져 있지 않으므로 docker에 올릴 파일구조를 수정하거나,
dockerfile 내부 구문을 바꾸셔야 합니다.
아마도 private를 challenge로만 바꿔도 해결될 문제일듯 합니다.
도움이 되셨길 바랍니다 :)

2023.11.03. 10:44
질문에 대한 답을 알고 계신가요?
지식을 나누고 포인트를 획득해보세요.
답변하고 포인트 받기