chef

command module
v0.0.0-...-10e7bda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

Chef

Chef is an autamus container recipe writer. Using package from autamus.io, we can generate a Dockerfile with any set of packages!

img/chef-stash.png

Usage

Build

To run chef, you can either run the go file directly:

$ go run chef.go
USAGE: chef CMD [OPTIONS]

DESCRIPTION: Generate scientific software container recipes

COMMANDS:

    NAME      ALIAS  DESCRIPTION
    generate  g      Generate a Dockerfile from a chef config file.
    help      ?      Get help with a specific subcommand
    version          Print the version of this command

You can also build the binary first, and then run it.

$ go build
$ ./chef
Generate

Currently, the main command generate requires a chef config file that lists packages that you want to install from autamus.io. For example:

# chef.yaml
packages:
 - clingo:latest
 - python:latest

We would then generate the Dockerfile as follows:

$ chef generate

or

$ go run chef.go generate
FROM ghcr.io/autamus/clingo:latest as clingo
FROM ghcr.io/autamus/python:latest as python
FROM spack/ubuntu-bionic
COPY --from=clingo /opt/software /opt/spack/opt/spack
COPY --from=python /opt/software /opt/spack/opt/spack
ENV PATH=/opt/spack/bin:$PATH
WORKDIR /opt/spack
RUN rm -rf opt/spack/.spack-db/
ENTRYPOINT ["/bin/bash"]

You could easily pipe this into a Dockerfile:

$ go run chef.go generate chef.yaml > Dockerfile

To skip validation that the images/tags exist (you'd find out when you build the Dockerfile) do:

$ go run chef.go generate --skip-validation

If you don't provide a chef.yaml file, it defaults to chef.yaml. However you can provide a custom filename:

$ go run chef.go generate custom.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL