Skip to content

Commit

Permalink
Merge pull request mszep#19 from TheDonDope/feature/docker
Browse files Browse the repository at this point in the history
feat(docker): provide docker integration
  • Loading branch information
mszep authored Jun 22, 2017
2 parents 9e578b0 + 693a40c commit c443235
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .docker/resume.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu

# prepare a user which runs everything locally! - required in child images!
RUN useradd --user-group --create-home --shell /bin/false app

ENV HOME=/home/app
WORKDIR $HOME

RUN apt-get update
RUN apt-get install build-essential pandoc context -y

ENV APP_NAME=resume

# before switching to user we need to set permission properly
# copy all files, except the ignored files from .dockerignore
COPY . $HOME/$APP_NAME/
COPY ./.docker/Makefile $HOME/$APP_NAME/
RUN chown -R app:app $HOME/*

USER app
WORKDIR $HOME/$APP_NAME

RUN make clean
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.tuc
*.log
*.pdf
*.html
resume.tex
*.swo
*.swp
*.docx
*.rtf
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ resume.rtf: resume.md
pandoc -s -S resume.md -o resume.rtf

clean:
rm resume.html
rm resume.tex
rm resume.tuc
rm resume.log
rm resume.pdf
rm resume.docx
rm resume.rtf
rm -f resume.html
rm -f resume.tex
rm -f resume.tuc
rm -f resume.log
rm -f resume.pdf
rm -f resume.docx
rm -f resume.rtf
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ vim resume.md # insert your own resume info
make
```

### Running Dockerized
```bash
git clone https://github.com/mszep/pandoc_resume
cd pandoc_resume
vim resume.md # insert your own resume info
docker-compose up -d
```

### Requirements

* ConTeXt
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2'

services:

resume-make:
build:
context: .
dockerfile: ./.docker/resume.dockerfile
command: make
container_name: resume-make
image: resume-make
volumes:
- .:/home/app/resume

0 comments on commit c443235

Please sign in to comment.