forked from github/pages-gem
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
36 lines (27 loc) · 945 Bytes
/
Dockerfile.alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ruby:3.3-alpine
ARG APK_PROXY
RUN if [ -n "$APK_PROXY" ]; then \
cp /etc/apk/repositories /etc/apk/repositories.bak && \
sed -i "s|dl-cdn.alpinelinux.org|$APK_PROXY|g" /etc/apk/repositories ; \
fi
RUN apk update && apk add --no-cache \
git
COPY . /src/gh/pages-gem
ARG GEM_PROXY
RUN if [ -n "$GEM_PROXY" ]; then \
bundle config mirror.https://rubygems.org "https://$GEM_PROXY";\
fi
# one step to exclude .build_deps from docker cache
RUN apk add --no-cache --virtual .build_deps \
make \
build-base && \
bundle config local.github-pages /src/gh/pages-gem && \
bundle install --gemfile=/src/gh/pages-gem/Gemfile && \
apk del .build_deps
RUN ln -f -s /src/gh/pages-gem/bin/github-pages /usr/local/bundle/bin/github-pages
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
WORKDIR /src/site
ENTRYPOINT ["github-pages"]
CMD ["serve", "-H", "0.0.0.0", "-P", "4000", "-I", "--watch", "--verbose"]