Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JeiKeiLim authored Sep 21, 2022
1 parent ec81acc commit c23aa10
Showing 1 changed file with 65 additions and 1 deletion.
66 changes: 65 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,69 @@


# Ducker
- Ducker the docker helper
- Ducker the docker helper. Ducker is go language based CLI application for easier docker usage purpose.

# Disclaimer
- Ducker has been developed for me and my organization usage purpose. It might not be suitable for everyone, however, I am willing to expand general purpose docker helper application. If you have any ideas, thought, and complains, please let me know. It would be much appreciated to build better tools for everyone.

# How to use
## Init
```shell
$ ducker init

Enter your name(Default: Anonymous): Jongkuk Lim
Enter contact address (Default: None): lim.jeikei@gmail.com
Success!
Dockerfile has been created in docker directory
```

This will generate basic `Dockerfile` and `Dockerfile.aarch64` under `./docker/` directory which you can find in [docker/Dockerfile](docker/Dockerfile) and [docker/Dockerfile.aarch](docker/Dockerfile.aarch). This basic Dockerfile contains ubuntu environment of parent's user permission(UID and GID) with NVIDIA CUDA ready (if possible) and oh-my-zsh support. Once you have successfully initialized Dockerfile, you are ready to build docker image.

You can insert cutom template dockerfile.
```shell
$ ducker init -t python
```

This will put (templates/python.Dockerfile)[templates/python.Dockerfile] contents after [docker/Dockerfile](docker/Dockerfile).


## Build
```shell
$ ducker build

...
Successfully tagged jeikeilim/ducker_test:x86_64
```

Docker image name is automatically generated by `Organization Name`/`Parent's directory name`:`Architecture name`. So you don't need to think about the naming convention. Now you are ready to run the docker container.

## Run
```shell
$ ducker run

─ ducker run
docker run --privileged -tid -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev --gpus all -v /home/limjk/.gitconfig:/home/user/.gitconfig --network host jeikeilim/ducker_test:x86_64 /usr/bin/zsh
cabbba0649c1800395a49f0037a5d459fd78d06835e5f0841c2529fb8d72a5e0
[powerlevel10k] fetching gitstatusd .. [ok]
user@mypc  ~ echo hello from ducker
hello from docker
```

`ducker run` will execute docker command with privilleged, display and gpu support, git config(if possible), and host network configuration.

## Exec
```shell
$ ducker exec
user@mypc ~
```

`exec` command runs last container you ran.



# Roadmap
- Custom base docker image
- Global configuration file for better flexibility
- Your idea


0 comments on commit c23aa10

Please sign in to comment.