-
Notifications
You must be signed in to change notification settings - Fork 5
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
initial import of Dockerfile #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a Resolves #40
in the description of this PR so it will close that issue when merged?
Dockerfile
Outdated
# [...] are the arguments to the fcli commandFROM alpine:latest | ||
|
||
# use Alpine Linux -- the resulting image is ~210mb | ||
FROM alpine:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already the easy to use image python:3-alpine
. https://hub.docker.com/_/python/
Check the Create a Dockerfile in your Python app project
section at that link above to see a way that could easily be adapted to run fcli
.
resolves #40 I reviewed several other Alpine-based python3 sources, including python:3-alpine and jfloff/alpine-python:3.4-slin ; unfortunately, they're even larger than the original (just pulling alpine-latest and installing the required packages). |
I'm not so worried about the size of the Docker image as I am about maintainability and not reinventing the wheel. |
set the base image back to python:3-alpine |
I added a Dockerfile so that a container with all of the correct libraries, packages, etc. needed to run fcli could be used without reliance upon the host system's installation of Python, etc..
To build the image:
docker build -t halprin/fcli .
To run the image:
docker run -v ~/.fcli:/.fcli halprin/fcli fcli
The last part of the docker run command ('fcli') is the command to run in the container; therefore, arguments passed after the 'flci' command are passed to fcli as options.
It may further be advantageous to create a shell alias to simplify running fcli; for example, consider the following:
the, one can use fcli "normally":