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

initial import of Dockerfile #39

Closed
wants to merge 5 commits into from

Conversation

wesley-dean
Copy link

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:

alias fcli="docker run -v ~/.fcli:/.fcli halprin/fcli fcli"

the, one can use fcli "normally":

fcli version

@wesley-dean wesley-dean mentioned this pull request Nov 1, 2018
Copy link
Owner

@halprin halprin left a 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
Copy link
Owner

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.

@wesley-dean-flexion
Copy link

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).

@halprin
Copy link
Owner

halprin commented Nov 16, 2018

I'm not so worried about the size of the Docker image as I am about maintainability and not reinventing the wheel.

@wesley-dean-flexion
Copy link

set the base image back to python:3-alpine

@halprin halprin closed this May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants