Created
January 12, 2025 10:44
-
-
Save palazzem/c9fefab3e59eacc7b1e31bf547b3fb40 to your computer and use it in GitHub Desktop.
Install `docker compose` plugin on Google Container-Optimized OS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="2.32.2" | |
# Install Docker Compose plugin in `/var/lib/google` (writable and stateful folder) | |
sudo curl -sSL https://github.com/docker/compose/releases/download/v$VERSION/docker-compose-linux-x86_64 -o /var/lib/google/docker-compose | |
sudo chmod o+x /var/lib/google/docker-compose | |
# Create symlink to install Docker Compose plugin | |
mkdir -p ~/.docker/cli-plugins | |
ln -sf /var/lib/google/docker-compose ~/.docker/cli-plugins/docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit: https://serverfault.com/a/1149540
The writable and executable mounts are:
/var/lib/{google,docker,toolbox}
(stateful)/var/lib/cloud
(stateless, tmpfs, 2 MB)/mnt/disks
(stateless, tmpfs, 256 KB)/var/lib/{google,docker,toolbox}
are the best options, and/var/lib/google
is probably better than/var/lib/docker
because we have to seto+x
(I suppose/var/lib/docker
lackso+x
for a reason).