# How to Extend the Base LabNow AI Docker Images with Additional Development Tools

> Extend LabNow AI Docker images with custom dev tools. Learn how to easily add Node.js, Rust, Go, Java and more by inheriting from base images and using setup functions.

- Repository: [LabNow.ai/lab-foundation](https://github.com/labnow-ai/lab-foundation)
- Tags: how-to-guide
- Published: 2026-03-05

---

**To extend LabNow AI Docker images, create a Dockerfile that inherits from `labnow/docker_base` or `labnow/docker_atom`, source the [`script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/script-setup.sh) helper library, and invoke specific `setup_<tool>()` functions to install Node.js, Rust, Go, Java, or other development tools.**

The `labnow-ai/lab-foundation` repository provides a modular Docker image hierarchy designed for data science and AI workflows. When you need to extend the base LabNow AI Docker images with additional development tools, the project provides a systematic approach using helper scripts and standardized installation functions rather than manual package management.

## Understanding the LabNow AI Image Hierarchy

The LabNow AI Docker ecosystem is built in layers, with each image serving a specific purpose:

- **`labnow/docker_base`**: Provides a minimal, Conda-based Python environment. Use this when you need a lightweight Python stack without full Ubuntu system utilities.
- **`labnow/docker_atom`**: Built on a full Ubuntu base with core system utilities and the [`script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/script-setup.sh) helper library pre-installed. This is the recommended starting point for complex development environments.
- **`labnow/docker_docker_kit`**: Extends the base image with Docker-Compose and Docker-Syncer capabilities, useful for container-in-container workflows.

## Step-by-Step: How to Extend LabNow AI Docker Images

### Choose Your Base Image

Select the appropriate foundation based on your target environment:

- Use `FROM labnow/docker_base` for Python-only data science stacks.
- Use `FROM labnow/docker_atom` when you need system-level tools, multiple languages, or the helper script library.

### Leverage the Setup Script Library

The file [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh) contains a comprehensive library of `setup_<tool>()` functions. These functions handle architecture detection, version fetching from upstream releases, extraction, and path registration automatically.

To access these helpers in your Dockerfile:

```dockerfile
COPY work /opt/utils/
RUN source /opt/utils/script-setup.sh && setup_<tool>

```

### Install Development Tools

The standard pattern for extending LabNow AI images involves sourcing the setup script, invoking the desired installation functions, and cleaning up temporary files:

```dockerfile
FROM labnow/docker_base

COPY work /opt/utils/

RUN set -eux && \
    source /opt/utils/script-setup.sh && \
    setup_node_base && \
    setup_rust && \
    setup_GO && \
    source /opt/utils/script-utils.sh && install__clean

```

## Practical Examples for Extending LabNow AI Images

### Adding Node.js, Yarn, and pnpm

To extend the base image with JavaScript development tools:

```dockerfile
FROM labnow/docker_base

COPY work /opt/utils/

RUN set -eux && \
    source /opt/utils/script-setup.sh && \
    setup_node_base && \
    setup_node_pnpm && \
    source /opt/utils/script-utils.sh && install__clean

```

The `setup_node_base` function installs Node.js and npm, while `setup_node_pnpm` adds the pnpm package manager. These functions are defined in [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh) at lines 42-60.

### Installing Java and Maven

For Java development environments:

```dockerfile
FROM labnow/docker_atom

COPY work /opt/utils/

RUN set -eux && \
    source /opt/utils/script-setup.sh && \
    setup_java_base && \
    setup_java_maven && \
    source /opt/utils/script-utils.sh && install__clean

```

The `setup_java_base` function installs OpenJDK 11 by default, and `setup_java_maven` adds the Maven build tool. These helpers handle version detection and `JAVA_HOME` configuration automatically.

### Setting Up R and Julia

For statistical computing and data science:

```dockerfile
FROM labnow/docker_base

COPY work /opt/utils/

RUN set -eux && \
    source /opt/utils/script-setup.sh && \
    setup_R_base && \
    setup_julia && \
    source /opt/utils/script-utils.sh && install__clean

```

The `setup_R_base` function installs the R language base packages, while `setup_julia` downloads and configures the latest stable Julia release.

### Adding System Packages with Custom apt Lists

To install additional OS-level dependencies:

Create a file named `my_dev.apt`:

```

build-essential
git
curl
wget
libpq-dev

```

Then reference it in your Dockerfile:

```dockerfile
FROM labnow/docker_base

COPY work /opt/utils/
COPY my_dev.apt /opt/utils/

RUN set -eux && \
    source /opt/utils/script-setup.sh && \
    install_apt /opt/utils/my_dev.apt && \
    source /opt/utils/script-utils.sh && install__clean

```

The `install_apt` function processes the package list and handles installation cleanup.

## Key Files and Functions Reference

| Path | Purpose |
|------|---------|
| `docker_base/Dockerfile` | Minimal Conda-Python base image |
| `docker_atom/Dockerfile` | Full Ubuntu image with core utilities and helper scripts |
| `docker_docker_kit/Dockerfile` | Adds Docker-Compose and Docker-Syncer capabilities |
| [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh) | Library of `setup_<tool>()` functions for installing development languages and tools |
| [`docker_atom/work/script-utils.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-utils.sh) | Utility helpers including `install_apt` and `install__clean` |
| `docker_atom/work/install_list_base.apt` | Default APT packages installed in base images |

## Summary

- **Extend LabNow AI Docker images** by creating a new Dockerfile that uses `FROM labnow/docker_base` or `FROM labnow/docker_atom`.
- **Leverage the helper library** at [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh) to access standardized `setup_<tool>()` functions for Node.js, Rust, Go, Java, R, Julia, and other languages.
- **Follow the standard pattern**: copy the `work` directory, source the setup script, invoke desired functions, and run `install__clean` to minimize image size.
- **Add system packages** by creating custom `.apt` list files and using the `install_apt` utility function.

## Frequently Asked Questions

### What is the difference between docker_base and docker_atom?

`labnow/docker_base` provides a minimal Conda-based Python environment suitable for lightweight data science workflows. `labnow/docker_atom` builds on a full Ubuntu base and includes system-level utilities, the [`script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/script-setup.sh) helper library, and broader compatibility for multi-language development environments. Choose `docker_base` for Python-only stacks and `docker_atom` when you need the helper scripts or full Ubuntu compatibility.

### How do I add a custom programming language not covered by the setup scripts?

If your language isn't supported by the existing `setup_<tool>()` functions in [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh), you can either extend the script by adding a new function following the existing pattern (architecture detection, download, extraction, and path registration), or install the language manually in your Dockerfile using standard `RUN` commands after sourcing the utility scripts for environment consistency.

### Can I install additional system packages using apt?

Yes. Create a text file with the `.apt` extension containing one package name per line, copy it into your image, and use the `install_apt` function from [`script-utils.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/script-utils.sh). For example: `install_apt /opt/utils/my_packages.apt`. This approach ensures consistent package installation and automatic cleanup.

### Where are the setup helper functions defined?

The setup helper functions are defined in [`docker_atom/work/script-setup.sh`](https://github.com/labnow-ai/lab-foundation/blob/main/docker_atom/work/script-setup.sh) within the `labnow-ai/lab-foundation` repository. This file contains standardized `setup_<tool>()` functions for installing Node.js, Rust, Go, Java, R, Julia, Lua, Bazel, Gradle, and other development tools. The functions handle architecture detection, version resolution, and environment configuration automatically.