Questions tagged [google-container-os]

Container-Optimized OS is an operating system image for your Compute Engine VMs that is optimized for running Docker containers

With Container-Optimized OS, you can bring up your Docker containers on Google Cloud Platform quickly, efficiently, and securely. Container-Optimized OS is maintained by Google and is based on the open source Chromium OS project. * Website

79 questions
30
votes
3 answers

Access Google Cloud service account credentials on Container OS inside Docker Container

Using the Container Optimized OS (COS) on Google Cloud Compute, what's the best way to access the credentials of the default service account for the VM-project from within a Docker container? $ gcloud compute instances create test-instance \ …
15
votes
2 answers

GitLab CI build fails with error: no space left on device.

Here is the scenario: created a kubernetes cluster in a google cloud project with default settings configured auto dev ops on gitlab as shown in the quickstart configured a .gitlab-ci.yml file as shown in the default kubernetes template (only…
14
votes
4 answers

Cannot run executable shell script on Google Container-Optimized OS

On any other linux distro, I can create a file with a shebang and run shell scripts like so: $ chmod +x test.sh $ ./test.sh Johnny hello Johnny But on Google Cloud Platform Container-Optimized OS, I get -bash: ./test.sh: Permission denied If I…
Matt Williamson
  • 39,165
  • 10
  • 64
  • 72
11
votes
4 answers

How to install Stackdriver monitoring agent in Google Container VM images?

I followed this instruction https://cloud.google.com/monitoring/agent/install-agent#linux-install $ curl -O "https://repo.stackdriver.com/stack-install.sh" $ sudo bash stack-install.sh --write-gcm Unidentifiable or unsupported platform. The content…
hiroshi
  • 6,871
  • 3
  • 46
  • 59
9
votes
0 answers

MQTT Connection Fails on Google Container OS

For my setup, I'm working with a third party MQTT VerneMQ broker hosted in AWS. I have been given username/password credentials to connect over secure MQTT (port 8883) using a specific clientId. My goal (though irrelevant to the issue at hand) is…
9
votes
3 answers

Is there a way to specify file size limit for docker logs on Google Container Optimized OS?

I had a very long running (and verbose) container job on Google's Container-Optimized OS (COS) that eventually generated enough logs to fill the disk. To my knowledge there isn't a way to rotate / limit log file size while using COS. Inspecting the…
Andrew Scherkus
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

Docker distroless image how to add customize certificate to trust store?

gcr.io/distroless/java How to add custom pki certificate?
ethan
  • 1,881
  • 2
  • 17
  • 31
8
votes
5 answers

Programmatically get current Service Account on GCP

Is there a way to programmatically access the email of the currently used Service Account on a GCP instance when no GOOGLE_APPLICATION_CREDENTIALS is set? (ie. when using the default Service Account) I've looked through the GCP documentation, but…
8
votes
3 answers

how to set container ulimits in Container-Optimized OS

I need to set ulimits on the container. For example, docker run --ulimit memlock="-1:-1" . However, I'm not sure how to do this when deploying a container-optimised VM on Compute Engine as it handles the startup of the container. I'm able to…
Vincent
  • 1,553
  • 1
  • 11
  • 21
8
votes
2 answers

compute engine startup script can't execute as a non-root user

Boiling my issue down to the simplest case, I'm using Compute Engine with the following startup-script: #! /bin/bash sudo useradd -m drupal su drupal cd /home/drupal touch test.txt I can confirm the drupal user exists after this command, so does…
7
votes
2 answers

docker login with root user on Container-VM Image

This is question about Google Container VM Image(beta) https://cloud.google.com/compute/docs/containers/vm-image/ I logged in a instance made by Container VM image. And run: sudo /usr/share/google/dockercfg_update.sh That script above does docker…
6
votes
4 answers

Can you run Docker containers in GCP via Terraform?

I have created a Docker image that I'd like to run in GCP using Terraform. I have tagged and pushed the image to GCR like this: docker tag carlspring/hello-spring-boot:1.0 eu.gcr.io/${PROJECT_ID}/carlspring/hello-spring-boot:1.0 docker push…
carlspring
  • 31,231
  • 29
  • 115
  • 197
4
votes
1 answer

COS: How do I restart a container that has a new image?

Im using the Google Container OS on Compute Engine, and Im using the web UI to start a single container. How do I restart the container with the same env and flags when I have pushed a new image? I can SSH into the machine and pull the new image,…
zino
  • 1,222
  • 2
  • 17
  • 47
4
votes
2 answers

How to enable swap/swapfile on Google container optimized OS on GCE?

Using the cos-stable container optimized OS on GCE. Micro instance so ram is pretty sparse. Tried to enable swap to prevent locking due to OOM during docker pulls, but can't get it to work. I realize most folders are stateless, so I put the swapfile…
odogggg
  • 43
  • 3
4
votes
1 answer

How to change the logName and configure the stackdriver logging agent in Container-Optimized OS?

I want to setup an export for logs generated in a Container-Optimized OS using Stackdriver Exports. In case of Linux VM instance, I know that the logName is taken from the file like /etc/google-fluentd/config.d/[APPLICATION_NAME].conf. For example:…
1
2 3 4 5 6