Problems Running a Dockerized Application on Slax OS


Project Description

We are having issues running an dockerized application in Slax OS in various situations, specifically from USB flash drives and MicroSD card. Here, we need to document these issues and provide background information for troubleshooting.


Environment


Hardware for USB Slax testing

Hardware for USB Slax testing




What Works

Our goal is to install Anuko Time Tracker virtual appliance in Docker format on USB media with persistent storage. The following steps work fine on all media.


$ wget -c https://www.anuko.com/download/time_tracker/usb_debug/docker_ssd_ext4.sb

Let's prepare some Slax modules to have a starting point for testing. I am doing this on Slax running from SSD formatted as ext4.

# cd /etc
# mkdir timetracker
# cd timetracker

Download the appliance.

# wget -c https://www.anuko.com/download/time_tracker/tt_trial_docker.zip
# unzip tt_trial_docker.zip
# rm tt_trial_docker.zip

The above leaves us with config.php, docker-compose.yml, and tt_trial_docker.tar files in /etc/timetracker directory. Run savechanges again to save this configuration in another module called tt_unzipped_ssd_ext4.sb and copy it to the /slax/modules/ directory on the drive. Now we have 2 modules in there: docker_ssd_ext4.sb and tt_unzipped_ssd_ext4.sb.

For reference, this file is temporarily available for download from the link below.

$ wget -c https://www.anuko.com/download/time_tracker/usb_debug/tt_unzipped_ssd_ext4.sb

So far, so good.


What Does Not Work

The problems start when we try to load images into Docker with this command.

# docker load -i tt_trial_docker.tar 

SSD with ext4



Note 1: SSD ext4 - Copy to RAM boot option becomes unreliable after we execute image load with persistent changes. First, there seem to be a significant delay to boot, Second, it hangs half-way through the process of trying to load the images again as per the above procedure. Hangs at exactly the same place if we try again, with almost unresponsive desktop.

System hangs have way during Docker image load

System hangs have way during Docker image load



After images are loaded, we can start Time Tracker with this command:

# docker-compose up 

it starts both containers and prints messages on screen. We can check it Time Tracker is working by connecting a browser to localhost and using the "Create Team" menu option that writes to the database.


Problem 1

Description: In SSD with MBR + ext4 configuration, Copy to RAM boot options becomes unreliable. Steps to reproduce:


SSD with fat32

We are using the same modules as prepared in SSD ext4 configuration. This configuration has a completely different issue.


Slow loading on images with persistent changes on fat32 SSD

Slow loading on images with persistent changes on fat32 SSD



Problem 2

Description: In SSD with MBR + fat32 configuration, loading Docker images is very slow. Steps to reproduce:


Micro SDHC Card with ext4

My data speed testing shows that a Micro SDHC card connected via USB 3.0 offers best write speeds, so we'll try it here.

We are using the same modules as prepared in SSD ext4.


Problem 3

Description: slow load in Micro SDHC card with MBR + ext4 configuration. Loading Docker images requires over 20 minutes. Application start requires 3 minutes (but appears to operate fine) Steps to reproduce:


Increase http timeout for docker-compose when running off Micro SDHC card

Increase http timeout for docker-compose when running off Micro SDHC card




Kingston USB 3.1flash drive via USB 3.0 port with ext4

We are using the same modules as prepared in SSD ext4.


Problem 4

Description: application not functional on Kingston USB 3.1 flash drive via USB 3.0 port with MBR + ext4 configuration. Loading Docker images requires over 50 minutes. Application start requires 'COMPOSE_HTTP_TIMEOUT increased to about 10 minutes. After start, the application is not functional. Steps to reproduce: