File tree Expand file tree Collapse file tree 4 files changed +77
-0
lines changed
Expand file tree Collapse file tree 4 files changed +77
-0
lines changed Original file line number Diff line number Diff line change 1+ .jekyll-cache
2+ .gitignore
3+ run.sh
4+ Dockerfile
5+ .dockerignore
6+ .git
7+ .github
Original file line number Diff line number Diff line change 1+ FROM ubuntu:24.04
2+
3+ ENV JEKYLL_SERVE_BIND=127.0.0.1
4+
5+ RUN apt-get update && \
6+ apt install -y git \
7+ curl \
8+ build-essential \
9+ libssl-dev \
10+ libreadline-dev \
11+ zlib1g-dev \
12+ libffi-dev \
13+ libyaml-dev \
14+ libncurses5-dev \
15+ libgdbm-dev \
16+ unzip \
17+ wget \
18+ golang && \
19+ rm -rf /var/lib/apt/lists/*
20+ ENV RBENV_ROOT /usr/local/rbenv
21+ RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
22+ git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build
23+
24+ ENV PATH="${RBENV_ROOT}/bin:/root/go/bin:${PATH}"
25+ RUN eval "$(rbenv init -)" && \
26+ rbenv install 3.4.4 && \
27+ rbenv global 3.4.4 && \
28+ gem install bundler && \
29+ go install github.com/asciitosvg/asciitosvg/cmd/a2s@latest
30+
31+ COPY Gemfile .
32+ COPY Gemfile.lock .
33+ RUN eval "$(rbenv init -)" && \
34+ bundle install
35+
36+ RUN mkdir /css/
37+ WORKDIR /css/
38+ COPY _sass .
39+ COPY bootstrap_setup.sh .
40+ RUN ./bootstrap_setup.sh
41+
42+ RUN mkdir /site/
43+ WORKDIR /site/
44+ COPY . .
45+
46+ EXPOSE 4000
47+ CMD eval "$(rbenv init -)" && cp -r /css/_sass/bootstrap /site/_sass/ && bundle exec jekyll serve --host ${JEKYLL_SERVE_BIND} --incremental --disable-disk-cache --destination /tmp/site
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ plugins:
4646exclude :
4747 - .idea
4848 - docs/README.md
49+ - Dockerfile
50+ - run.sh
51+ - bootstrap_setup.sh
52+ - README.md
4953# - .sass-cache/
5054# - .jekyll-cache/
5155# - gemfiles/
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ OS=$( uname)
3+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
4+ cd ${SCRIPT_DIR}
5+ CONTAINER_ENGINE=${CONTAINER_ENGINE:- podman}
6+
7+ RUN_ARGS=()
8+ if [ " $OS " = ' Darwin' ]; then
9+ RUN_ARGS+=(--env JEKYLL_SERVE_BIND=0.0.0.0 --publish 4000:4000)
10+ elif [ " $CONTAINER_ENGINE " = ' podman' ]; then
11+ RUN_ARGS+=(--net host -v $( pwd) :/site/:Z)
12+ else
13+ RUN_ARGS+=(--net host)
14+ fi
15+ RUN_ARGS+=(--rm -it kroxylicious-website)
16+
17+ ${CONTAINER_ENGINE} build . -t kroxylicious-website
18+
19+ ${CONTAINER_ENGINE} run " ${RUN_ARGS[@]} "
You can’t perform that action at this time.
0 commit comments