강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của ghdxodml4791
ghdxodml4791

câu hỏi đã được viết

Môi trường Docker và CI để học hỏi bằng cách làm theo [bản cập nhật 2023.11]

Viết file .travis.yml (bao gồm cả kiểm thử)

트레비스에서 he command "docker run -e CI=true tedkov2024/docker-react-nginx-app npm run test -- --coverage" exited with 127. 형태로 에러가 발생합니다.

Viết

·

314

0

he command "docker run -e CI=true tedkov2024/docker-react-nginx-app npm run test -- --coverage" exited with 127.

 

 

85.61s$ docker build -t tedkov2024/docker-react-nginx-app -f Dockerfile .
0.60s$ docker run -e CI=true tedkov2024/docker-react-nginx-app npm run test -- --coverage
/docker-entrypoint.sh: 47: exec: npm: not found
The command "docker run -e CI=true tedkov2024/docker-react-nginx-app npm run test -- --coverage" exited with 127.
Done. Your build exited with 1.

 

 

무엇이 문제인지 모르겠습니다.

awsdockergithubci/cdtravis-ci데이터-엔지니어링

Câu trả lời 1

0

ghdxodml4791님의 프로필 이미지
ghdxodml4791
Người đặt câu hỏi

도커파일을 아래와 같이 수정하니되었습니다.

# 기존의 Node.js 빌드 스테이지 FROM node:alpine as builder WORKDIR '/usr/src/app' COPY package.json ./ RUN npm install COPY ./ ./ RUN npm run test -- --coverage RUN npm run build # Nginx 스테이지 FROM nginx COPY --from=builder /usr/src/app/build /usr/share/nginx/html
Hình ảnh hồ sơ của ghdxodml4791
ghdxodml4791

câu hỏi đã được viết

Đặt câu hỏi