Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: generators for alternative base image types #71

Open
nokome opened this issue Jan 2, 2019 · 0 comments
Open

refactor: generators for alternative base image types #71

nokome opened this issue Jan 2, 2019 · 0 comments

Comments

@nokome
Copy link
Member

nokome commented Jan 2, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant