Spaces:
Sleeping
Sleeping
Nicky Nicolson
commited on
Commit
·
bb7d345
1
Parent(s):
85892f5
Add minimal jekyll site
Browse files- Dockerfile +33 -1
- Gemfile +11 -0
- _config.yml +4 -0
- index.md +7 -0
Dockerfile
CHANGED
|
@@ -4,7 +4,39 @@ USER root
|
|
| 4 |
|
| 5 |
# Install ruby and jekyll
|
| 6 |
RUN apt update
|
| 7 |
-
RUN apt-get -y install ruby-full build-essential zlib1g-dev
|
| 8 |
RUN gem install jekyll bundler
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
RUN echo "here"
|
|
|
|
| 4 |
|
| 5 |
# Install ruby and jekyll
|
| 6 |
RUN apt update
|
| 7 |
+
RUN apt-get -y install ruby-full build-essential zlib1g-dev nginx
|
| 8 |
RUN gem install jekyll bundler
|
| 9 |
|
| 10 |
+
RUN gem sources --add https://repository.gbif.org/repository/rubygems.org/ && \
|
| 11 |
+
gem sources --remove https://rubygems.org/ && \
|
| 12 |
+
/usr/local/bin/bundle config set mirror.https://rubygems.org https://repository.gbif.org/repository/rubygems.org && \
|
| 13 |
+
su-exec jekyll /usr/local/bin/bundle config set mirror.https://rubygems.org https://repository.gbif.org/repository/rubygems.org
|
| 14 |
+
|
| 15 |
+
# GBIF dockerfile
|
| 16 |
+
ENV JEKYLL_UID=0 \
|
| 17 |
+
JEKYLL_GID=0 \
|
| 18 |
+
JEKYLL_ROOTLESS=1 \
|
| 19 |
+
TZ=UTC
|
| 20 |
+
|
| 21 |
+
# GBIF dockerfile
|
| 22 |
+
RUN apk --no-cache add curl && \
|
| 23 |
+
curl -Ss --output-dir /srv/jekyll/ --remote-name --fail https://raw.githubusercontent.com/gbif/hp-template/master/Gemfile && \
|
| 24 |
+
curl -Ss --output-dir /srv/jekyll/ --remote-name --fail https://raw.githubusercontent.com/gbif/hp-template/master/Gemfile.lock && \
|
| 25 |
+
/usr/local/bin/bundle config set frozen true && \
|
| 26 |
+
/usr/local/bin/bundle install
|
| 27 |
+
|
| 28 |
+
# Disable problematic entrypoint scripts
|
| 29 |
+
RUN rm -rf /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh \
|
| 30 |
+
/docker-entrypoint.d/20-envsubst-on-templates.sh
|
| 31 |
+
|
| 32 |
+
# Create the site directory and set permissions
|
| 33 |
+
RUN mkdir -p /site && chown -R jekyll:jekyll /site
|
| 34 |
+
|
| 35 |
+
# Switch to the jekyll user (avoid root issues)
|
| 36 |
+
USER jekyll
|
| 37 |
+
|
| 38 |
+
WORKDIR /site
|
| 39 |
+
RUN bundle install
|
| 40 |
+
RUN jekyll build
|
| 41 |
+
|
| 42 |
RUN echo "here"
|
Gemfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
source 'https://rubygems.org'
|
| 2 |
+
|
| 3 |
+
gem "jekyll", "~> 3.9"
|
| 4 |
+
gem "kramdown-parser-gfm", "~> 1.1"
|
| 5 |
+
gem "webrick", "~> 1.7"
|
| 6 |
+
|
| 7 |
+
gem "jekyll-theme-architect", "~> 0.1.1"
|
| 8 |
+
|
| 9 |
+
group :jekyll_plugins do
|
| 10 |
+
gem "jekyll-sitemap", "~> 1.4"
|
| 11 |
+
end
|
_config.yml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
theme: jekyll-theme-architect
|
| 2 |
+
|
| 3 |
+
plugins:
|
| 4 |
+
- jekyll-sitemap
|
index.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Home
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
## Minimal Jekyll site
|
| 6 |
+
|
| 7 |
+
This is a minimal site for demo purposes in huggingface spaces
|