TIL: How to Use Default Values in docker-compose.yml

TIL: How to Use Default Values in docker-compose.yml Sometimes we want to use env variables in our docker-compose files like so: services: client: image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/nginx ports: - 8000:80 Here we are going to use the GitLab CI dependency proxy to pull our Nginx image, so we can speed up our pipelines but also avoid being rate limited by docker hub. However, when running this locally, we will need to make sure the CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX env variable is set. ...

TIL: How to Use Clipboard Data as File Input in Bash

TIL: How to Use Clipboard Data as File Input in Bash Recently, I wanted to run a bash script where it needed to receive a JSON file as input. However, the JSON I had was taken from somewhere on the internet. In this case, it was taking a JSON blob and converting it to a nix attribute set. However, I didn’t want to save the contents to a file beforehand. ...

 2023-11-01 129 words 1 min