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

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

Open
r4z3c opened this issue May 28, 2018 · 0 comments
Open

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

r4z3c opened this issue May 28, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@r4z3c
Copy link
Contributor

r4z3c commented May 28, 2018

"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

@r4z3c r4z3c added the enhancement New feature or request label May 28, 2018
@r4z3c r4z3c mentioned this issue May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant