-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (33 loc) · 1.12 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
# using multi-stage: 2 build steps auto run in parallel
###############################################################################
# super lightweight webserver
FROM ubuntu:latest AS serverbuilder
WORKDIR /home
# assembler to binary
RUN apt update &&\
apt install -y git make yasm as31 nasm binutils &&\
git clone --depth=1 https://github.com/nemasu/asmttpd.git &&\
cd asmttpd &&\
make release
###############################################################################
# jekyll build
FROM ruby:latest AS pagebuilder
WORKDIR /home
# install deps (docker cache)
COPY Gemfile .
RUN bundle install
# build
COPY . .
RUN bundle exec jekyll build --baseurl ''
###############################################################################
# run
FROM scratch
LABEL name="Kinh nhật tụng"
LABEL description="Vietnamese Mahayana Buddhism rituals in multiple languages"
LABEL author="PTA"
COPY --from=serverbuilder /home/asmttpd/asmttpd /
COPY --from=pagebuilder /home/_site /web_root
# default dir name of asmttpd
# any port of choice, here python default port
EXPOSE 8000
CMD ["/asmttpd", "/web_root", "8000"]