# Docker

- Page: https://shared.btbytes.com/p/docker
- Date: 2020-04-13
- Tags: docker, linux, containers

[Docker](http://www.docker.io) is an open-source engine which automates
the deployment of applications as highly portable, self-sufficient
containers which are independent of hardware, language, framework,
packaging system and hosting provider.

See also:

- [nanobox](http://web.archive.org/web/20160112093637/https://nanobox.io/)
- [Nabla containers: a new approach to container isolation · Nabla Containers](https://nabla-containers.github.io/)


## Building docker from scratch

* [A Workshop on Linux Containers: Rebuild Docker from Scratch | Hacker News](https://news.ycombinator.com/item?id=16734440)
* [Fewbytes/rubber-docker: A workshop on Linux containers: Rebuild Docker from Scratch](https://github.com/Fewbytes/rubber-docker)
* [(1) Building a container from scratch in Go - Liz Rice (Microscaling Systems) - YouTube](https://www.youtube.com/watch?v=Utf-A4rODH8)
* [(1) Golang UK Conf. 2016 - Liz Rice - What is a container, really? Let's write one in Go from scratch - YouTube](https://www.youtube.com/watch?v=HPuvDm8IC-4)
* [(1) Cgroups, namespaces, and beyond: what are containers made from? - YouTube](https://www.youtube.com/watch?v=sK5i-N34im8)
* [Building Containers in Pure Bash and C](http://web.archive.org/web/20160224051044/http://containersummit.io/events/nyc-2016/videos/building-containers-in-pure-bash-and-c)
* [Linux Namespaces – Ed King – Medium](https://medium.com/@teddyking/linux-namespaces-850489d3ccf)
* [p8952/bocker: Docker implemented in around 100 lines of bash](https://github.com/p8952/bocker)
* [tonybaloney/mocker: A crappy imitation of Docker, written in 100% Python](https://github.com/tonybaloney/mocker)
* [Docker Without Docker](http://chimeracoder.github.io/docker-without-docker/#1)

## Articles

- [Dockerfile best-practices for writing production-worthy Docker images.](https://github.com/hexops/dockerfile); Jan 2021
- [Docker is the dangerous gamble which we will regret | Smash Company](http://www.smashcompany.com/technology/docker-is-a-dangerous-gamble-which-we-will-regret)
- [12 Fractured Apps — Medium](https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c#.ytgnxdgbk) -- docker anti-patterns.
- [Intro do docker on infoq](http://www.infoq.com/articles/docker-containers)
- [Tutorials on Docker](http://blog.docker.io/2013/06/14-great-tutorials-on-docker/)
- [Docker cheatsheet](https://gist.github.com/wsargent/7049221)
- [Why I don't use Docker much anymore - Abe Voelker](https://blog.abevoelker.com/why-i-dont-use-docker-much-anymore/)
- [Docker in Production: An History of Failure – The HFT Guy](https://thehftguy.wordpress.com/2016/11/01/docker-in-production-an-history-of-failure/) Nov 2016. Follow up: [Docker in Production: An Update – The HFT Guy](https://thehftguy.com/2017/02/23/docker-in-production-an-update/) Feb 2017.
- [Docker Considered Harmful](http://catern.com/posts/docker.html) Jan 2016.
- [Mitigating Docker security issues](http://web.archive.org/web/20200930131608/https://arxiv.org/ftp/arxiv/papers/1804/1804.05039.pdf)
- [Another reason why your Docker containers may be slow](https://hackernoon.com/another-reason-why-your-docker-containers-may-be-slow-d37207dec27f)
- [The Cost of Containerization for Your Scylla - ScyllaDB](https://www.scylladb.com/2018/08/09/cost-containerization-scylla/)

## Software related to docker:

- [abiosoft/colima: Container runtimes on macOS (and Linux) with minimal setup](https://github.com/abiosoft/colima)

- [Alpine Linux Docker image](https://github.com/gliderlabs/docker-alpine) -- A super small Docker image based on Alpine Linux. The image is only 5 MB and has access to a package repository that is much more complete than other BusyBox based images.

- [pauldotknopf/darch](https://github.com/pauldotknopf/darch)

> It is essentially Docker, but you can boot bare-metal with it. It even uses Docker under the hood. Every boot is a fresh boot. You can read-write during boot, but all changes are made to ram. You mount with fstab things you want persisted, like home.
It uses very simply primitives, which makes it easy to use. Squashfs/grub-mkconfig/overlayfs/etc. Docker isn't exactly a "primitive", but it is easily reasoned with.
reply -- [creator comment](https://news.ycombinator.com/item?id=15480011)

* [GoogleContainerTools/jib: Build container images for your Java applications.](https://github.com/GoogleContainerTools/jib) (also see [fabric8io/docker-maven-plugin](https://dmp.fabric8.io/))
* [GoogleContainerTools/distroless: 🥑 Language focused docker images, minus the operating system.](https://github.com/GoogleContainerTools/distroless)

* [coord-e/magicpak: Build minimal docker images without static linking](https://github.com/coord-e/magicpak) "enables you to build minimal docker images without any bothersome preparation such as static linking."

```docker
# You prepare /bin/your_executable here...

ADD https://github.com/coord-e/magicpak/releases/latest/download/magicpak-x86_64-unknown-linux-musl /usr/bin/magicpak
RUN chmod +x /usr/bin/magicpak

RUN /usr/bin/magicpak -v /bin/your_executable /bundle

FROM scratch
COPY --from=0 /bundle /.

CMD ["/bin/your_executable"]
```


[BuildKit in depth: Docker's build engine explained | Hacker News](https://news.ycombinator.com/item?id=39277451)

[Building container images - using no tools · Ravikanth Chaganti](https://ravichaganti.com/blog/2022-11-28-building-container-images-using-no-tools/)

## More Articles

- [Learn Docker by Building a Microservice](http://www.dwmkerr.com/learn-docker-by-building-a-microservice/)
- September 2016. [Moving from Docker to rkt](https://medium.com/@adriaandejonge/moving-from-docker-to-rkt-310dc9aec938#.uuilq78l3)

![](https://files.btbytes.com/images/cdn-images-1.medium.com/max/1600/1*2J_pK3ZKJmePxCJsb1wSCQ.png)


## Dockerizing applications

- [OddMuse Wiki Dockerized](https://thelackthereof.org/TLT/2018.02.05/OddMuse_Wiki_Dockerized). See also - [Docker Compose | Docker Documentation](https://docs.docker.com/compose/)


## Nix and Docker

- [Nix is a better Docker image builder than Docker's image builder](https://xeiaso.net/talks/2024/nix-docker-build/); Mar 2024 by [Xe](https://xeiaso.net/)
