Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jekyll-docker
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
envygeeks
jekyll-docker
Commits
1c4d76bb
Commit
1c4d76bb
authored
5 years ago
by
Jordon Bedwell
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup Dockerfile
parent
4c8bfbb9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
repos/jekyll/Dockerfile
+35
-30
35 additions, 30 deletions
repos/jekyll/Dockerfile
with
35 additions
and
30 deletions
repos/jekyll/Dockerfile
+
35
−
30
View file @
1c4d76bb
...
...
@@ -2,10 +2,10 @@ FROM <%= @meta.base_image %>
LABEL
maintainer "Jordon Bedwell <jordon@envygeeks.io>"
COPY
copy /
#
--
#
# EnvVars
# Ruby
#
--
#
ENV
BUNDLE_HOME=/usr/local/bundle
ENV
BUNDLE_APP_CONFIG=/usr/local/bundle
...
...
@@ -13,10 +13,11 @@ ENV BUNDLE_BIN=/usr/local/bundle/bin
ENV
GEM_BIN=/usr/gem/bin
ENV
GEM_HOME=/usr/gem
#
--
#
# EnvVars
# Image
# --
#
ENV
JEKYLL_VAR_DIR=/var/jekyll
ENV
JEKYLL_DOCKER_TAG=<%= @meta.tag %>
ENV
JEKYLL_VERSION=<%= @meta.release?? @meta.release : @meta.tag %>
...
...
@@ -26,10 +27,11 @@ ENV JEKYLL_DATA_DIR=/srv/jekyll
ENV
JEKYLL_BIN=/usr/jekyll/bin
ENV
JEKYLL_ENV=development
#
--
#
# EnvVars
# System
# --
#
ENV
LANG=en_US.UTF-8
ENV
LANGUAGE=en_US:en
ENV
TZ=America/Chicago
...
...
@@ -38,34 +40,38 @@ ENV LC_ALL=en_US.UTF-8
ENV
LANG=en_US.UTF-8
ENV
LANGUAGE=en_US
#
--
#
# EnvVars
# User
# --
#
<% if @meta.env? %>
ENV <%= @meta.env %>
<% end %>
#
--
#
# EnvVars
# Main
# --
#
env
VERBOSE=false
env
FORCE_POLLING=false
env
DRAFTS=false
#
--
#
# Packages
# User
# --
#
<% if @meta.packages? %>
RUN apk --no-cache add <%= @meta.packages %>
<% end %>
#
--
#
# Packages
# Dev
# --
#
RUN
apk
--no-cache
add
\
zlib-dev
\
libffi-dev
\
...
...
@@ -80,10 +86,11 @@ RUN apk --no-cache add \
vips-dev
\
cmake
#
--
#
# Packages
# Main
# --
#
RUN
apk
--no-cache
add
\
linux-headers
\
openjdk8-jre
\
...
...
@@ -103,43 +110,45 @@ RUN apk --no-cache add \
libressl
\
yarn
#
--
#
# Gems
# Update
# --
#
RUN
echo
"gem: --no-ri --no-rdoc"
>
~/.gemrc
RUN
unset
GEM_HOME
&&
unset
GEM_BIN
&&
\
yes
| gem update
--system
#
--
#
# Gems
# Main
#
--
# Work around a nonsense RubyGem permission bug.
#
RUN
unset
GEM_HOME
&&
unset
GEM_BIN
&&
yes
| gem
install
--force
bundler
RUN
gem
install
jekyll
-v
<%
=
@meta.release??
\
@meta.release : @meta.tag %>
--
\
--use-system-libraries
#
--
#
# Gems
# User
# --
#
<% if @meta.gems? %>
# Stops slow Nokogiri!
RUN gem install <%=@meta.gems %> -- \
--use-system-libraries
<% end %>
# --
RUN
addgroup
-Sg
1000 jekyll
RUN
adduser
-Su
1000
-G
\
jekyll jekyll
#
--
#
# Remove development packages on minimal.
# And on pages. Gems are unsupported.
# --
#
<% if @meta.name == "minimal" || @meta.name == "pages" || @meta.tag == "pages" %>
RUN apk --no-cache del \
linux-headers \
...
...
@@ -159,20 +168,16 @@ RUN adduser -Su 1000 -G \
cmake
<% end %>
# --
RUN
mkdir
-p
$JEKYLL_VAR_DIR
RUN
mkdir
-p
$JEKYLL_DATA_DIR
RUN
chown
-R
jekyll:jekyll
$JEKYLL_DATA_DIR
RUN
chown
-R
jekyll:jekyll
$JEKYLL_VAR_DIR
RUN
chown
-R
jekyll:jekyll
$BUNDLE_HOME
# --
RUN
rm
-rf
/root/.gem
RUN
rm
-rf
/home/jekyll/.gem
RUN
rm
-rf
$BUNDLE_HOME
/cache
RUN
rm
-rf
$GEM_HOME
/cache
# --
CMD
["jekyll", "--help"]
ENTRYPOINT
["/usr/jekyll/bin/entrypoint"]
WORKDIR
/srv/jekyll
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment