Skip to content

refactor: generators for alternative base image types #71

Description

@nokome

For our Nix integration we ended up taking the approach of generating a Dockerfile which is based on the nixos/nix image (and copying default.nix into it). Currently, the code for this is spread between cli-nix.ts and NixGenerator.nix.

A more general approach might be to refactor generators so that Dockter can support multiple base images. e.g. including Alpine (for small very, self contained, images)

A new command line option, base, would be used to specify the base image

dockter build --base=ubuntu:18.10

With aliases for commonly used images.

dockter build --<ubuntu,nix,alpine>

The best way to do this is refactoring is to have generators for each base image type e.g. UbuntuGenerator, NixGenerator and get rid of the language specific generators e.g. PythonGenerator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions