This repository gathers Docker code examples coming from various websites and books. It also includes several batch files for experimenting with Docker on the Windows machine. |
Ada, Akka, C++, COBOL, Dart, Deno, Erlang, Flix, Golang, GraalVM, Haskell, Kafka, Kotlin, LLVM, Modula-2, Node.js, Rust, Scala 3, Spark, Spring, TruffleSqueak and WiX Toolset are other trending topics we are continuously monitoring.
Project dependencies ▴
Optionally one may also install the following software:
🔎 Git for Windows provides a BASH emulation used to run
git
from the command line (as well as over 250 Unix commands likeawk
,diff
,file
,grep
,more
,mv
,rmdir
,sed
andwc
).
For instance our development environment looks as follows (May 2024) 1:
C:\opt\ConEmu\ ( 26 MB) C:\opt\Git\ (366 MB) C:\opt\VSCode\ (341 MB) C:\Program Files\Docker\ (2.8 GB)
Directory structure ▴
This project is organized as follows:
bin\ docs\ examples\{README.md} README.md RESOURCES.md setenv.bat
where
- directory
bin\
provides several utility batch files. - directory
docs\
contains Docker related papers/articles. - directory
examples\
contains Docker code examples grabbed from various websites. - file
README.md
is the Markdown document for this page. - file
RESOURCES.md
gathers Docker related informations. - file
setenv.bat
is the batch script for setting up our environment.
We also define a virtual drive – e.g. drive O:
– in our working environment in order to reduce/hide the real path of our project directory (see article "Windows command prompt limitation" from Microsoft Support).
🔎 We use the Windows external command
subst
to create virtual drives; for instance:> subst O: %USERPROFILE%\workspace\docker-examples
In the next section we give a brief description of the batch files present in this project.
Batch commands ▴
We execute command setenv.bat
once to setup our development environment; it makes external tools such as docker.exe
, git.exe
, and sh.exe
directly available from the command prompt.
> setenv -verbose Tool versions: docker 26.1.1, kubectl v1.29.2, git 2.45.1.windows.1, diff 3.10, bash 5.2.26(1)-release Tool paths: C:\Program Files\Docker\Docker\resources\bin\docker.exe C:\Program Files\Docker\Docker\resources\bin\kubectl.exe C:\opt\Git\bin\git.exe C:\opt\Git\usr\bin\diff.exe C:\opt\Git\bin\bash.exe Environment variables: "DOCKER_HOME=C:\Program Files\Docker\Docker\" "GIT_HOME=C:\opt\Git" Path associations: O:\: => C:\Users\michelou\workspace-perso\docker-examples\ > where docker git sh C:\Program Files\Docker\Docker\resources\bin\docker C:\Program Files\Docker\Docker\resources\bin\docker.exe C:\opt\deno\deno.exe C:\opt\Git\bin\git.exe C:\opt\Git\mingw64\bin\git.exe C:\opt\Git\bin\sh.exe C:\opt\Git\usr\bin\sh.exe
[1] Downloads ↩
- In our case we downloaded the following installation files (see section 1):
-
ConEmuPack.230724.7z ( 5 MB) Docker Desktop Installer.exe (481 MB) PortableGit-2.45.1-64-bit.7z.exe ( 41 MB)