Skip to content

Commit

Permalink
0.1.6 mount /var/run/docker.sock to enable docker-in-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSchlichting committed Jan 13, 2025
1 parent 464e65c commit c5d0361
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Options:

### Installation
`curl https://raw.githubusercontent.com/JoshuaSchlichting/jo.sh/master/jo.sh --output jo.sh && chmod +x jo.sh && ./jo.sh install`
> Note: You may need to modify the above command to use `sudo` for the `jo.sh install` if you do not have permission to write to `/usr/local/bin`.
> Note: You may need to modify the above command to use `sudo` for the `./jo.sh install` if you do not have permission to write to `/usr/local/bin`.

### Add custom `Dockerfile` commands
Expand Down
6 changes: 5 additions & 1 deletion jo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
JOSH_VERSION=0.1.5
JOSH_VERSION=0.1.6
if [[ "$1" = "--version" || "$1" = "-v" ]]; then
echo $JOSH_VERSION
exit 0
Expand Down Expand Up @@ -146,6 +146,7 @@ if [ "$1" = "run" ]; then
--platform linux/amd64 \
-w /app \
-v $HOME/.aws:/root/.aws \
-v /var/run/docker.sock:/var/run/docker.sock \
$PORT_BINDINGS \
$CONTAINER_NAME $DETACH_DETAILS
elif [ "$1" = "stop" ]; then
Expand Down Expand Up @@ -270,6 +271,7 @@ elif [[ "$1" == *.sh ]]; then
--platform linux/amd64 \
-w /app \
-v $HOME/.aws:/root/.aws \
-v /var/run/docker.sock:/var/run/docker.sock \
$CONTAINER_NAME "${@:1}"
elif [[ "$1" == *.py ]]; then
docker run \
Expand All @@ -280,6 +282,7 @@ elif [[ "$1" == *.py ]]; then
--platform linux/amd64 \
-w /app \
-v $HOME/.aws:/root/.aws \
-v /var/run/docker.sock:/var/run/docker.sock \
--entrypoint python \
$CONTAINER_NAME "${@:1}"
elif [[ "$1" == *help ]]; then
Expand Down Expand Up @@ -316,6 +319,7 @@ else
--platform linux/amd64 \
-w /app \
-v $HOME/.aws:/root/.aws \
-v /var/run/docker.sock:/var/run/docker.sock \
$CONTAINER_NAME
} || {
{
Expand Down

0 comments on commit c5d0361

Please sign in to comment.