-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a Dockerfile which builds a Docker image with all required dependencies included. It helps to simplify installation and usage of the tool.
- Loading branch information
spawnia
committed
Mar 14, 2018
1 parent
72fba63
commit e436420
Showing
3 changed files
with
68 additions
and
31 deletions.
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 @@ | ||
# Utilize multi-stage build to keep image size down | ||
FROM composer as composer | ||
COPY composer.* ./ | ||
RUN composer install --no-dev --optimize-autoloader --no-progress --no-suggest | ||
|
||
# Build the actual image | ||
FROM php | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -qqy --no-install-recommends\ | ||
# This is for enabling the program to be run with watch | ||
procps \ | ||
wkhtmltopdf \ | ||
# Required to run PDF generation | ||
xvfb \ | ||
xauth \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=composer /app/vendor /app/vendor | ||
COPY . /app | ||
|
||
RUN ln -s /app/bin/md2resume /usr/bin/md2resume | ||
|
||
RUN echo "alias md2pdf=\"xvfb-run md2resume pdf\"" >> ~/.bashrc | ||
|
||
WORKDIR /resume |
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
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