-
Notifications
You must be signed in to change notification settings - Fork 439
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
Add a Dockerfile to run gitsome in a Docker container #99
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
########################################################## | ||
# # | ||
# Build the image: # | ||
# docker build -t gitsome . # | ||
# # | ||
# Run the container: # | ||
# docker run -ti --rm -v $(pwd):/src/ \ # | ||
# -v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \ # | ||
# -v ${HOME}/.gitconfig:/root/.gitconfig \ # | ||
# gitsome # | ||
# # | ||
########################################################## | ||
FROM python:3.5 | ||
|
||
RUN pip install Pillow | ||
|
||
COPY /requirements-dev.txt /gitsome/ | ||
WORKDIR /gitsome/ | ||
RUN pip install -r requirements-dev.txt | ||
|
||
COPY / /gitsome/ | ||
RUN pip install -e . | ||
|
||
RUN mkdir /src/ | ||
WORKDIR /src/ | ||
ENTRYPOINT ["gitsome"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,8 @@ For no color, set the value(s) to `None`. `white` can appear as light gray on s | |
|
||
## Available Platforms | ||
|
||
`gitsome` is available for Mac, Linux, Unix, and [Windows](#windows-support). | ||
`gitsome` is available for Mac, Linux, Unix, [Windows](#windows-support) and | ||
[Docker](#running-as-docker-container). | ||
|
||
## TODO | ||
|
||
|
@@ -176,6 +177,7 @@ For no color, set the value(s) to `None`. `white` can appear as light gray on s | |
* [Installation](#installation) | ||
* [Pip Installation](#pip-installation) | ||
* [Virtual Environment Installation](#virtual-environment-installation) | ||
* [Running as Docker container](#running-as-docker-container) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we capitalize "Container"? |
||
* [Running the `gh configure` Command](#running-the-gh-configure-command) | ||
* [For GitHub Enterprise Users](#for-github-enterprise-users) | ||
* [Enabling Bash Completions](#enabling-bash-completions) | ||
|
@@ -548,6 +550,34 @@ To deactivate the `gitsome` `virtualenv`, run: | |
|
||
$ deactivate | ||
|
||
### Running as Docker Container | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be "Running as a Docker Container"? If we make this change, please update line 180 |
||
|
||
You can run gitsome in a Docker container to avoid installing Python and pip locally. To install Docker check out the [official Docker documentation](https://docs.docker.com/engine/getstarted/step_one/#step-1-get-docker). | ||
|
||
Once you have docker installed you can run gitsome: | ||
|
||
$ docker run -ti --rm mariolet/gitsome | ||
|
||
You can use Docker volumes to let gitsome access your working directory, your local .gitsomeconfig and .gitconfig: | ||
|
||
$ docker run -ti --rm -v $(pwd):/src/ \ | ||
-v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \ | ||
-v ${HOME}/.gitconfig:/root/.gitconfig \ | ||
mariolet/gitsome | ||
|
||
If you are running this command often you will probably want to define an alias: | ||
|
||
$ alias gitsome="docker run -ti --rm -v $(pwd):/src/ \ | ||
-v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \ | ||
-v ${HOME}/.gitconfig:/root/.gitconfig \ | ||
mariolet/gitsome" | ||
|
||
To build the Docker image from sources: | ||
|
||
$ git clone https://github.com/donnemartin/gitsome.git | ||
$ cd gitsome | ||
$ docker build -t gitsome . | ||
|
||
### Starting the `gitsome` Shell | ||
|
||
Once installed, run the optional `gitsome` autocompleter with interactive help: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we combine lines 124 and 125 into a single line?