title: Can't make outbound request from Google Cloud Run fully managed
body: <p>While trying to make an outbound request to an external API from Google Cloud Run fully managed, the http call gets stuck somehow or we are running into the following <code>SSLHandshakeException Remote host terminated the handshake</code> after a little while. The image works well when executed locally so I assume this comes from the sandboxed cloud run environment.</p>
  
  <p>My docker configuration:</p>
  
  <pre><code>FROM maven:3.6.3-jdk-11 as builder
  
  WORKDIR /app
  COPY pom.xml .
  COPY src ./src
  
  # Build a release artifact.
  RUN mvn package -DskipTests
  
  FROM openjdk:11-jdk
  
  COPY --from=builder /app/target/poc-*.jar /poc.jar
  
  # Run the service on container startup.
  CMD ["java","-Djava.security.egd=file:/dev/./urandom","-Dserver.port=${PORT}","-jar","/poc.jar"]
  </code></pre>
  
  <p>The snippet of code getting stuck:</p>
  
  <pre><code>private HttpEntity&lt;String&gt; prepareSecuredRestCallToAJStage() {
      CredentialsDTO credentials = new CredentialsDTO(USERNAME, PASSWORD);
      // Getting stuck here
      TokenDTO response = restTemplate.postForObject(LOGIN_CHECK_URL, credentials, TokenDTO.class);
      // We never get the response
      String token = BEARER_TOKEN_PREFIX + Objects.requireNonNull(response).getToken();
  }
  </code></pre>
  
  <p>For information, this is a Spring Boot application and we are getting this trace at startup:<br>
  <code>Container Sandbox: Unsupported syscall setsockopt(0x9,0x6,0x6,0x3e7a3d678e2c,0x4,0xa)</code></p>
  
  <p>Is there something I'm missing?</p>