joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 422 forks source link

Doc suggestion - Docker run #356

Open jfftonsic opened 2 years ago

jfftonsic commented 2 years ago

Hi, great project! I just wanted to share a quick-and-dirty docker run one liner if anyone feel a docker container is useful there as I did. You may close this issue without changing anything if you want. I didn't know where else to share this. Cheers guys

# Access the working directory that you have the markdown files
# change what you require on the command below, then run it
docker run -it --name python-grip --rm \
    -p 6419:6419 \
    --env FILE=README.md \
    --env DEBUG=True \
    --env DEBUG_GRIP=True \
    --env HOST=0.0.0.0 \
    -v "$(pwd)":/workspace \
    python bash -c "pip install grip && mkdir ~/.grip/ && bash -c \"echo -e \\\"DEBUG=\$DEBUG\nDEBUG_GRIP=\$DEBUG_GRIP\nHOST='\$HOST'\\\" >> ~/.grip/settings.py \" && cd workspace/ && grip \$FILE"

# access the page at localhost:6419 on your browser
nemre commented 2 years ago

Thank you @jfftonsic

pataquets commented 7 months ago

Linking to related PR #317