Skip to content

Implementar script para parametrizar a instrução CMD #2

@r4z3c

Description

@r4z3c

"A boa aqui seria ter um script bootstrap.sh que conforme o parâmetro que vc chama o docker, roda o install e o jupyter, ou só o install ou só um jupyter.

Algo assim:

#bootstrap.sh
if [[ $1 == "-i" || $1 == "-install" ]]; then
  pip install -r requirements.txt
fi

if [[ $1 == "-j" || $1 == "--jupyter" ]]; then
  jupyter notebook
fi

# se n tem parametro nenhum
if [ -z "$1" ]; then
  pip install -r requirements.txt && jupyter notebook
fi

e dai mudar no dockerfile

CMD bash -c "bootstrap.sh""

https://github.com/estantevirtual/dockerhub/pull/1/files#r191081557

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions