-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for easy installation on local machine (#532)
- Loading branch information
1 parent
c09d3ee
commit 0e9d3a4
Showing
6 changed files
with
106 additions
and
1 deletion.
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,32 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: amirpourmand/al-folio |
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,13 @@ | ||
FROM jekyll/jekyll | ||
Label MAINTAINER Amir Pourmand | ||
#install imagemagick tool for convert command | ||
RUN apk add --no-cache --virtual .build-deps \ | ||
libxml2-dev \ | ||
shadow \ | ||
autoconf \ | ||
g++ \ | ||
make \ | ||
&& apk add --no-cache imagemagick-dev imagemagick | ||
WORKDIR /srv/jekyll | ||
ADD Gemfile /srv/jekyll/ | ||
RUN bundle install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FILE=Gemfile.lock | ||
if [ -f "$FILE" ]; then | ||
rm $FILE | ||
fi | ||
docker build -t "al-folio:latest" . |
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,7 @@ | ||
FILE=Gemfile.lock | ||
if [ -f "$FILE" ]; then | ||
rm $FILE | ||
fi | ||
docker run --rm -v "$PWD:/srv/jekyll/" -p "8080:8080" \ | ||
-it al-folio:latest bundler \ | ||
exec jekyll serve --watch --port=8080 --host=0.0.0.0 |
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,7 @@ | ||
FILE=Gemfile.lock | ||
if [ -f "$FILE" ]; then | ||
rm $FILE | ||
fi | ||
docker run --rm -v "$PWD:/srv/jekyll/" -p "8080:8080" \ | ||
-it amirpourmand/al-folio bundler \ | ||
exec jekyll serve --watch --port=8080 --host=0.0.0.0 |