사용자 정의 docker 파일을 사용하여 appengine에 vue.js 코드를 배포하려고 하는데 오류가 발생합니다. The docker file is works good 내 로컬 컴퓨터에서. 누구든지 문제가 무엇인지 말해 줄 수 있습니까?
여기 내 도커 파일이 있어요
FROM node:9.11.1-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:1.13.12-alpine as production-stage
COPY nginx/default.conf /etc/nginx/conf.d/
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
이게 내 app.yaml이에요
# application: lifeprint2-1222
service: admin-panel
env: flex
runtime: custom
network:
forwarded_ports:
- 80:80
# eof
코드를 배포하는 동안 발생하는 오류의 세부정보는 다음과 같습니다.
Updating service [admin-panel] (this may take several minutes)...⠛DEBUG: Operation [apps/lifeprint2demo/operations/e858191d-28bd-4ce6-b7cc-6f6ea751ed6f] not complete. Waiting to retry.
Updating service [admin-panel] (this may take several minutes)...⠹DEBUG: Operation [apps/lifeprint2demo/operations/e858191d-28bd-4ce6-b7cc-6f6ea751ed6f] complete. Result: {
"metadata": {
"user": "[email protected]",
"target": "apps/lifeprint2demo/services/admin-panel/versions/20180902t214321",
"@type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1",
"insertTime": "2018-09-02T16:46:35.958Z",
"method": "google.appengine.v1.Versions.CreateVersion"
},
"done": true,
"name": "apps/lifeprint2demo/operations/e858191d-28bd-4ce6-b7cc-6f6ea751ed6f",
"error": {
"message": "An internal error occurred during deployment.",
"code": 13
}
}
Updating service [admin-panel] (this may take several minutes)...failed.
DEBUG: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.
Traceback (most recent call last):
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 839, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 770, in Run
resources = command_instance.Run(args)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/surface/app/deploy.py", line 90, in Run
parallel_build=False)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 598, in RunDeploy
flex_image_build_option=flex_image_build_option)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 407, in Deploy
extra_config_settings)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 207, in DeployService
poller=done_poller)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 315, in WaitForOperation
sleep_ms=retry_interval)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 254, in WaitFor
sleep_ms, _StatusUpdate)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 316, in PollUntilDone
sleep_ms=sleep_ms)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 229, in RetryOnResult
if not should_retry(result, state):
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 310, in _IsNotDone
return not poller.IsDone(operation)
File "/Users/nomanmaqsood/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 184, in IsDone
encoding.MessageToPyValue(operation.error)))
OperationError: Error Response: [13] An internal error occurred during deployment.
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.
답변1
다음과 같이 컨테이너가 포트 8080에서 수신 대기하도록 설정하세요.이 문서, 그 뒤에 전달된_포트 부분을 생략할 수 있습니다.
80을 80으로 전달하려는 것이 기본 80-8080 규칙과 충돌합니다.
건배,
미겔.