Last active
April 26, 2024 12:20
-
-
Save supersonictw/1dc1cc0d74f4578827577a5f30cb7b47 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# docker-local | |
# License: MIT (https://ncurl.xyz/s/RD0Yl5fSg) | |
# https://gist.github.com/supersonictw/1dc1cc0d74f4578827577a5f30cb7b47 | |
# Usage: | |
# docker-local login example.org | |
# docker-local pull example.org/the_app:latest | |
set -e | |
WORK_DIR=$(pwd) | |
DOCKER_BIN="/usr/bin/docker" | |
export DOCKER_CONFIG="$WORK_DIR/.docker" | |
if [ ! -d "$DOCKER_CONFIG" ]; then | |
mkdir -p $DOCKER_CONFIG | |
fi | |
#!/bin/sh | |
# docker-local | |
# https://gist.github.com/supersonictw/1dc1cc0d74f4578827577a5f30cb7b47 | |
# Usage: | |
# docker-local login example.org | |
# docker-local pull example.org/the_app:latest | |
set -e | |
WORK_DIR=$(pwd) | |
DOCKER_BIN="/usr/bin/docker" | |
export DOCKER_CONFIG="$WORK_DIR/.docker" | |
if [ ! -d "$DOCKER_CONFIG" ]; then | |
mkdir -p $DOCKER_CONFIG | |
fi | |
"$DOCKER_BIN" $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For
docker-compose
v1, DOCKER_CONFIG is working.DOCKER_CONFIG=$(pwd)/.docker docker-compose pull