docker-image-from-frecklets

Example:

# Build a docker image with Java installed.
- docker-image-from-frecklets:
    frecklets:
    - java-lang-installed
    name: freckles-java

Description

Build a Docker image from a frecklet.

This is just a proof-of-concept, to show that sometime like this is easily possible. It currently only works with Debian-based base images, as the pre-written Dockerfile template uses 'apt' to install curl. This would be easily changed once this is done properly.

Resources

Variables

Name Type Default Description

frecklets

list --

The frecklets to use in the Docker container. Required

name

string --

The name of the image. Required

base_image

string ubuntu:18.04

The base image to use.

force

boolean False

Whether to force the build to be done, even if an image with that name exists already.

nocache

boolean False

Whether to use cache when building an image.

Examples

Example 1

Build a docker image with Java installed.

Code
- docker-image-from-frecklets:
    frecklets:
    - java-lang-installed
    name: freckles-java

Example 2

Build a docker image with both Java & Go installed

Code
- docker-image-from-frecklets:
    name: freckles-java-go
    frecklets:
    - java-lang-installed
    - go-lang-installed
    force: true
    no_cache: true
Description

Don't use the Docker cache, and build the image even if an image named 'freckles-java-go' already exists.

Command-line

frecklecute docker-image-from-frecklets --help

Usage: frecklecute docker-image-from-frecklets [OPTIONS]

  Build a Docker image from a frecklet.

  This is just a proof-of-concept, to show that sometime like this is easily
  possible. It currently only works with Debian-based base images, as the
  pre-written Dockerfile template uses 'apt' to install curl. This would be
  easily changed once this is done properly.

Options:
  -f, --frecklet FRECKLETS  The frecklets to use in the Docker container.
                            [required]
  --name NAME               The name of the image.  [required]
  --base-image BASE_IMAGE   The base image to use.  [default: ubuntu:18.04]
  --force / --no-force      Whether to force the build to be done, even if an
                            image with that name exists already.
  --no-cache                Whether to use cache when building an image.
  --help                    Show this message and exit.