Skip to content

Commit ce806d1

Browse files
committed
Adds Dockerized build environment & scripts
1 parent 93e8344 commit ce806d1

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ruby:2.7-buster
2+
3+
# Install program to configure locales as per
4+
# https://github.com/jekyll/jekyll/issues/4268#issuecomment-167406574
5+
RUN apt-get update && apt-get install -y locales
6+
RUN dpkg-reconfigure locales && \
7+
locale-gen C.UTF-8 && \
8+
/usr/sbin/update-locale LANG=C.UTF-8
9+
10+
# Install needed default locale for Makefly
11+
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
12+
13+
# Set default locale for the environment
14+
ENV LC_ALL C.UTF-8
15+
ENV LANG en_US.UTF-8
16+
ENV LANGUAGE en_US.UTF-8
17+
18+
RUN mkdir -p /opt/io/elementary/releases
19+
WORKDIR /opt/io/elementary/releases
20+
21+
COPY Gemfile ./
22+
RUN gem install jekyll && bundle install
23+
24+
ENTRYPOINT ["/usr/local/bin/bundle", "exec", \
25+
"jekyll", "serve", \
26+
"--host", "0.0.0.0", \
27+
"--port", "4000"]

bin/build-container

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
cd $(git rev-parse --show-toplevel) # work from repo dir
4+
docker build -t io.elementary.releases .

bin/serve

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
cd $(git rev-parse --show-toplevel) # work from repo dir
4+
docker run --rm -it \
5+
-v $(pwd):/opt/io/elementary/releases/ \
6+
-p 4000:4000 \
7+
io.elementary.releases

0 commit comments

Comments
 (0)