-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add a Dockerfile * chore: add a Makefile to support Docker operations * docs: update documentation to include Docker support * ci: add step to check Docker build * fix: typo in docker image reference * docs: add information about make help * docs: update docker documentation to use advance md features Co-authored-by: David Lakin <[email protected]> * update the make serve log message to have URL * update to newer jekyll docker image for ruby version --------- Co-authored-by: Ulises Gascón <[email protected]> Co-authored-by: David Lakin <[email protected]> Co-authored-by: Jon Church <[email protected]>
- Loading branch information
1 parent
2078c57
commit d76b2bd
Showing
4 changed files
with
66 additions
and
0 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
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,23 @@ | ||
# Use the official Jekyll image as the base | ||
FROM jekyll/jekyll:4.2.2 | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Change the permissions of the working directory | ||
RUN chmod 777 /usr/src/app | ||
|
||
# Copy the Gemfile into the image | ||
COPY Gemfile ./ | ||
|
||
# Install the gems and delete the Gemfile.lock | ||
RUN bundle install --no-cache && rm Gemfile.lock | ||
|
||
# Copy the rest of the project into the image | ||
COPY . . | ||
|
||
# Expose the port Jekyll will run on | ||
EXPOSE 4000 | ||
|
||
# The default command to run Jekyll | ||
CMD ["jekyll", "serve", "--host", "0.0.0.0", "--livereload"] |
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,27 @@ | ||
GREEN := \033[1;32m | ||
BLUE := \033[1;34m | ||
RESET := \033[0m | ||
|
||
# The directory of this file | ||
DIR := $(shell echo $(shell cd "$(shell dirname "${BASH_SOURCE[0]}" )" && pwd )) | ||
|
||
# This will output the help for each task | ||
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
.PHONY: help | ||
|
||
help: ## This help | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "${GREEN}%-30s${RESET} %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
serve: ## Local server | ||
@echo "${BLUE}Starting expressjs.com at http://localhost:4000${RESET}" | ||
docker run -p 4000:4000 -p 35729:35729 -v $(DIR):/usr/src/app expressjs.com | ||
|
||
build: ## Build site | ||
@echo "${BLUE}Building site...${RESET}" | ||
docker build -t expressjs.com . | ||
|
||
clean: ## Clean up | ||
@echo "${BLUE}Clean up...${RESET}" | ||
docker rmi expressjs.com |
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