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

Docker Optimization #1340

Closed
johnwesley opened this issue Feb 24, 2019 · 4 comments
Closed

Docker Optimization #1340

johnwesley opened this issue Feb 24, 2019 · 4 comments
Assignees
Milestone

Comments

@johnwesley
Copy link
Contributor

Is your feature request related to a problem? Please describe.
To make deploying Algo with Docker more streamlined, I have written a Makefile to build, deploy, and clean.

In addition to the above, I had run into some issues with algo calling the ansible-playbook binary from within the virtualenv. I didn't see the need to activate a virtualenv within an image or a container, but realize this is exactly how the main algo script needs to operate for a desktop OS.

Describe the solution you'd like
The Makefile has four targets:

  1. docker-build
  2. docker-deploy (deploys server instance from container, bind-mounts, etc)
  3. docker-clean (remove image)
  4. all

Remove source env/bin/activate from the Dockerfile letting Ansible install to /usr/local/bin in this ephemeral environment. This way algo can still activate an environment and call ansible-playbook; running normally.

Describe alternatives you've considered
There's a reason for activating a virtualenv in a container I have missed.

Additional context
I have a branch ready for a PR that's been tested with OSX. If the maintainers think this is a worthwhile endeavor, I would be happy to provide further testing and documentation.

It consists of two changes to date:

  1. one Makefile
  2. one line removed from Dockerfile

Thank you

@jackivanov
Copy link
Collaborator

jackivanov commented Feb 26, 2019

Thanks, I think this would be a good enhancement. I don't see any reason to run virtualenv inside a docker container as well. Could you send a PR, please?

@johnwesley
Copy link
Contributor Author

@jackivanov done and opened as a draft. The make docker-clean target needs logic to remove any stopped containers, in addition to any other concerns you may have. Thank you.

@jackivanov jackivanov added this to the 1.1 milestone Mar 12, 2019
@jackivanov jackivanov modified the milestones: 1.1, 1.2 Jul 15, 2019
@jackivanov jackivanov added 1.2 and removed 1.1 labels Jul 15, 2019
@johnwesley
Copy link
Contributor Author

Got it. I'll get a branch up.

@johnwesley johnwesley mentioned this issue Aug 18, 2019
3 tasks
@jackivanov
Copy link
Collaborator

Closed by #1553

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

No branches or pull requests

2 participants