Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/selfup/dkr
dkr is docker but for docker containers?
https://github.com/selfup/dkr
Last synced: about 1 month ago
JSON representation
dkr is docker but for docker containers?
- Host: GitHub
- URL: https://github.com/selfup/dkr
- Owner: selfup
- License: mit
- Created: 2020-05-27T23:13:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T12:52:39.000Z (over 3 years ago)
- Last Synced: 2024-04-14T05:13:12.255Z (8 months ago)
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dkr
Docker for Docker containers?
This project was inspired by [Liz Rice](https://www.lizrice.com/)
### deps
1. go ([golang](https://golang.org/))
1. `./scripts/fs.sh` (this pulls minirootfs)### build
`./scripts/build.sh`
### boot container host
`docker-compose up --build`
### run dkr in container host
`docker-compose exec --privileged dkr ./dkr run /bin/sh`
Here you will be in a shell.
Example of hostname manipulation of dkr container instead of the docker container:
```
dkr $ docker-compose exec --privileged dkr ./dkr run /bin/sh
2020/05/27 23:49:24 run() executing [/bin/sh]
2020/05/27 23:49:24 fork() executing [/bin/sh]
/ # hostname
f60818cfd391
/ # hostname dkr
/ # hostname
dkr
/ # exit
dkr $ docker-compose exec --privileged dkr ./dkr run /bin/sh
2020/05/27 23:51:17 run() executing [/bin/sh]
2020/05/27 23:51:17 fork() executing [/bin/sh]
/ # hostname
f60818cfd391
/ #
```See how the running `docker-compose up --build` continainer still has the same hostname?
Yea we did it!!
### linux
If you are already on linux just:
```bash
# pulls minitrootfs
./scripts/fs.sh
# builds dkrd and dkr linux bins
./scripts/build.shsudo MINIROOTFS_HOME=$(pwd) ./dkr /bin/bash
```### license
This project is MIT licensed. Please check the LICENSE file.