Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Container manager keep terminate container on signal 9

I am trying to play with Google Cloud Run, I have the same service that works fine in App Engine Flex. Any thoughts what could be the issue?

enter image description here

Somehow it shows that service is healthy.

enter image description here

like image 969
Askar Avatar asked Apr 12 '19 14:04

Askar


2 Answers

This means infrastructure (container manager) scales down the number instances when traffic drops.

It's safe to ignore.

like image 88
wlhee Avatar answered Sep 26 '22 23:09

wlhee


For others who find this question when their container didn't start the first time you deployed it: It's important to note that you need to have it listening on the environment variable PORT.

It appears that Cloud Run will dynamically map your container to a port at invocation, and the service that you're running needs to (dynamically) use this to serve it's content.

For reference, here's how I got the base Apache Docker image to work with Cloud Run to host a static site built via Node:

FROM node:lts AS build
COPY . .
RUN npm install
RUN npm run build

FROM httpd:latest
ENV PORT=80
RUN sed -i 's/80/${PORT}/g' /usr/local/apache2/conf/httpd.conf
COPY --from=build ./dist/ /usr/local/apache2/htdocs/
like image 26
CenterOrbit Avatar answered Sep 22 '22 23:09

CenterOrbit