Docker Development Environment Setup¶
Introduction¶
The Docker development environment consists of an Ubuntu 24.04 image as a base and some utility tools installed within it that are needed for development using FWD. The resulting image allows developers to use FWD immediately, without having to locally install an entire development environment. This image is useful even for experienced developers.
The image is available on the goldencode repository of Docker Hub: https://hub.docker.com/u/goldencode
Usage of the Docker Development Environment¶
In step 1 OS Environment Setup for Docker, you setup your development system to have a bash shell in which Docker containers can be executed. The development system is referred to as the Docker "host".
In this step, you will use the bash shell to:
- Download the developer Docker image.
- Installs scripts named
dbash.shandfbash.shinto the Docker host.
dbash.sh and fbash.sh are helper scripts to make it easy to execute various development processes. dbash.sh (Docker bash) is a command line tool to run a container with the Docker Development basedev_ubuntu_24.04 image and fbash.sh (FWD bash) is a command line tool to run a container with a FWD Docker Development fwddev_ubuntu_24.04_jdk17:latest image.
Retrieve and Position the dbash.sh (Docker bash) and fbash.sh (FWD Docker bash) scripts¶
To get copies of these important scripts, you must be able to access the Docker Hub. The repository is public, no login is needed.
From a bash shell, run these commands:
docker pull goldencode/basedev_ubuntu_24.04:latest docker cp "$(docker create goldencode/basedev_ubuntu_24.04:latest):/opt/repos/dbash.sh" . docker cp "$(docker create goldencode/basedev_ubuntu_24.04:latest):/opt/repos/fbash.sh" .
This will leave copies of dbash.sh and fbash.sh in your current directory. Copy them to a location in your path, such as $HOME/.local/bin or better /usr/local/bin which will also work on shared environments (systems in which there are multiple users), but requires sudo:
sudo cp *bash.sh /usr/local/bin sudo chmod gou+rx /usr/local/bin/*bash.sh
Now the scripts are available for use from any location in your host's bash shell.
dbash.sh (Docker bash) Primer¶
dbash.sh will create a development environment which has all of the necessary utilities to access repositories and build applications.
By default, no ports are opened. If you want to make ports available, utilize the --port-... options in the usage below. If you start multiple containers, only one can own the opened port. If you are utilizing PostGreSQL, you can override the default port that is used by PG with --pgport=<port>, and then open it up for access via --port-pg=<port>. You an manually specify any port access with --manual_port=<hport:cport>[,<hport:cport>...], which includes a comma-separated pairings if hport:cport (host port:container port).
Note: this script has a run limit of 10 docker containers at a time.
Important note: the environment will only have access to the home directory of the user who launched it. If you require access to any area on the root directory, you will want to mount them with --manual_mount=<ext_vol:int_vol>[,<ext_vol:int_vol>...]. For example, if you keep project files in /opt/projects, you will want to mount that with --manual_mount=/opt/projects:/opt/projects and then you will be able to access /opt/projects in the container.
There are 2 ways to use dbash.sh:
- Interactive Mode
- If you invoke
dbash.shwithout parameters, you will get an "interactive" Docker session. This puts you in abashshell inside the container. - From this session you can inspect the container and do anything you can normally do inside an Ubuntu system, including running multiple commands or scripts.
- When you are done, type
exitand press ENTER. This will exit the session and leave you back at thebashprompt on the Docker host. - You can leave the container running, and return to the host using the keystrokes
CTRL-P+CTRL-Q. The container is running, and can be seen withdocker ps -a. You can return to the container withdocker attach <container name>. You can find the container name in the NAMES column of thedocker ps -aoutput.
- If you invoke
- One-Shot Command Mode
- When you pass
-c "<command>",dbash.shwill start a "one-shot" container and will then exit after the<command>is performed. - The subsequent sections of this guide give detailed information about how to invoke
dbash.shusing this mode. They will provide examples of commands to use for specific purposes. - This uses the Docker image as a kind of command line program that can be invoked on the Docker host to do some job.
- When you pass
fbash.sh (FWD Docker bash) Primer¶
fbash.sh behaves in the same manner as dbash.sh, but includes the -f (and supports the --tag=<tag>) implicitly. The container uses a pre-built FWD version inside the image and also creates a development environment which has all of the necessary utilities to access repositories and build applications.
Docker Image Details¶
If you want more details about what is in the image, see Docker Development Image Details.
© 2004-2026 Golden Code Development Corporation. ALL RIGHTS RESERVED.