Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:2-alpine

# A Docker image for gists.cli
# https://github.com/khilnani/gists.cli

RUN pip install gists.cli
RUN adduser -Dh /gists gists


USER gists
WORKDIR /gists

ENTRYPOINT [ "/usr/local/bin/gists" ]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,17 @@ If you would like to contribute changes to the code base
- Change directory to `./_vagrant`
- Run `./debug.ssh up centos` or `./debug.ssh up ubuntu` - This runs Vagrant with Debug Level INFO

## Docker

- Build the container with `docker build -t gists .`
- If you run the image using the command below, everything in the current directory will be available within the container. In particular, it is useful to put your oauth token into `.gists`, where it will be found by gists running in the container
- Example usage:
- List gists: `docker run --rm -it -v $(pwd):/gists gists -l`
- Download: `docker run --rm -it -v $(pwd):/gists gists -g :1 .`
- An example wrapper script is in `gists-docker` and can be invoked in place of `gists`. All options are passed to gists running within the container
- Caveats:
- Only the current working directory is mounted in the examples above. Files passed as options will not be available if they are in a different directory

# Issues and Roadmap

- Take a look at https://github.com/khilnani/gists.cli/issues to view Issues and Milestones.
Expand Down
3 changes: 3 additions & 0 deletions gists-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

exec docker run --rm -it -v $(pwd):/gists gists ${@}