Skip to content

Instantly share code, notes, and snippets.

View thaJeztah's full-sized avatar
🐳
Reviewing da peee-aaaaarrs

Sebastiaan van Stijn thaJeztah

🐳
Reviewing da peee-aaaaarrs
View GitHub Profile
@thaJeztah
thaJeztah / git-auto-sign-commits.sh
Created September 13, 2019 14:04 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
# Source: http://frippery.org/busybox/
# This Dockerfile builds a (32-bit) busybox images which is suitable for
# running many of the integration-cli tests for Docker against a Windows
# daemon. It will not run on nanoserver as that is 64-bit only.
#
# John Howard (IRC jhowardmsft, Email [email protected])
#
# To build: docker build -t busybox .
# To publish: Needs someone with publishing rights
#
@thaJeztah
thaJeztah / dockerhub-v2-api-user.sh
Created June 7, 2019 10:56 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME=""
UPASS=""
@thaJeztah
thaJeztah / README.md
Last active November 9, 2024 12:38
Docker Changelog CLI plugin

Docker Changelog CLI plugin

Based on a tweet by @Tomwillfixit

Just a quick fun conversion to make it work as a Docker CLI plugin

To use it (assuming you're running a beta of Docker 19.03):

@thaJeztah
thaJeztah / README.md
Last active February 8, 2023 19:38
Docker Compose as a Docker CLI plugin

Run Docker Compose as a Docker CLI plugin

Just a quick fun experiment to try to make docker-compose work as a Docker CLI plugin

To use it (assuming you have docker compose installed):

  1. download a and install nightly build of the docker cli (linux macOS)
@thaJeztah
thaJeztah / git-cheat-list.md
Created September 28, 2018 12:31
Git cheat list

Git cheat list

  • stashing everything except staged changes:

    git stash -ku
    
  • fixing dates and authors in the commits:

    git rebase -i HEAD~<NUMBER_OF_LAST_COMMITS_TO_REBASE>
    
@thaJeztah
thaJeztah / a-do-a-run-run-a-do-a-run.md
Last active March 5, 2024 14:32
Silly experiments with `RUN --mount`

Silly experiments with RUN --mount

relates to moby/moby#32507, moby/buildkit#442

Doing some silly experimenting with RUN --mount:

# syntax=docker/dockerfile:1

FROM alpine AS stage1
@thaJeztah
thaJeztah / dapply
Created July 11, 2018 13:35 — forked from cam8001/dapply
Apply a patch directly from a URL without downloading it first.
#!/bin/bash
# Downloads and applies a patch from Drupal.org.
if [ -z "$1" ]
then
echo "You need to supply a URL to a patch file."
exit
fi
URL=$1;

Keybase proof

I hereby claim:

  • I am thajeztah on github.
  • I am thajeztah (https://keybase.io/thajeztah) on keybase.
  • I have a public key ASAg7yCbSkogz_Lm5I7eNReLoVx_9WYeJr7bULRs54xY7go

To claim this, I am signing this object:

@thaJeztah
thaJeztah / cross-compose-project-communication.md
Last active August 22, 2019 09:50
Connecting to services in different compose projects

Cross-compose network connections

When running a compose project, services are accessible both through their full name (including the project-name prefix, for example, myproject_web_1), and through their service name (as specified in the compose-file), for example web. The short name is a network-scoped alias, which means that any container connected to the same network can access the container through this name.

By default, docker-compose creates a network for each compose project (projectname_default) so that all services in the compose project can communicate. Because that network is created for each project individually, two compose project don't share the same network, and their services are isolated from other compose projects.

It's possible, however, to make compose projects (or individual services in a compose project) share the same network.

Example 1 - using a shared network for the whole project