Last active
August 1, 2023 19:46
-
-
Save daluu/ba1ce114e2e78cdf7eae183d39a0075f to your computer and use it in GitHub Desktop.
Revisions
-
daluu revised this gist
Aug 1, 2023 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,4 +20,16 @@ export DOCKERHOST="$(ifconfig en0 inet | grep "inet " | awk -F'[: ]+' '{ print $ docker stop $(docker ps -a -q) | xargs docker rm #docker rm $(docker ps -a -q) docker rmi $(docker images --filter "dangling=true" -q --no-trunc) #export DOCKER_HOST='unix:///Users/USERNAME/.local/share/containers/podman/machine/podman-machine-default/podman.sock' # useful only for Mac OS Silicon M1, # still working but useless for the other platforms docker() { if [[ `uname -m` == "arm64" ]] && [[ "$1" == "run" || "$1" == "build" ]]; then /usr/local/bin/docker "$1" --platform linux/amd64 "${@:2}" else /usr/local/bin/docker "$@" fi } -
daluu revised this gist
Feb 25, 2022 . 1 changed file with 16 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,4 +5,19 @@ docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/. # get compressed size of docker images (after they're pulled locally) docker save image-name:latest > sizetest.tar gzip sizetest.tar ls -lh sizetest.tar.gz # see https://github.com/docker/docker/issues/1143 export DOCKERHOST="$(ifconfig en0 inet | grep "inet " | awk -F'[: ]+' '{ print $2 }')" ---- #!/bin/sh -x # http://stackoverflow.com/questions/33995276/no-space-left-on-device-while-installing-a-tar-using-docker # with docker 1.13 #docker system prune docker stop $(docker ps -a -q) | xargs docker rm #docker rm $(docker ps -a -q) docker rmi $(docker images --filter "dangling=true" -q --no-trunc) -
daluu renamed this gist
Nov 14, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
daluu revised this gist
Oct 31, 2019 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ docker system prune --volumes docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash circleci/node:12 # get compressed size of docker images (after they're pulled locally) docker save image-name:latest > sizetest.tar gzip sizetest.tar ls -lh sizetest.tar.gz -
daluu created this gist
Jul 27, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ docker system prune --volumes docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash circleci/node:12