-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
51 lines (37 loc) · 1.02 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
49
50
51
# build command:
# docker build -t rbrewer123/nikola .
FROM nfnty/arch-mini
# add pkgbuilder repo
RUN echo '' >>/etc/pacman.conf
RUN echo '[pkgbuilder]' >>/etc/pacman.conf
RUN echo 'Server = https://pkgbuilder-repo.chriswarrick.com/' >>/etc/pacman.conf
# gnupg bugfix
RUN mkdir -p /root/.gnupg && \
touch /root/.gnupg/dirmngr_ldapservers.conf
RUN pacman-key -r 5EAAEA16
RUN pacman-key --lsign 5EAAEA16
RUN pacman -Syu --needed --noconfirm \
base-devel \
pkgbuilder \
python-webassets
RUN echo 'en_US.UTF-8 UTF-8' >>/etc/locale.gen
RUN echo 'en_DK.UTF-8 UTF-8' >>/etc/locale.gen
RUN locale-gen
RUN echo 'user ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/user
RUN useradd -m user
USER user
WORKDIR /home/user
RUN pkgbuilder --noconfirm \
python-pygal \
python-pyphen \
python-typogrify
RUN pkgbuilder --noconfirm \
python-nikola
USER root
WORKDIR /root
RUN userdel user
RUN rm -rf /home/user
COPY runasuser.sh /root/
RUN chmod a+x /root/runasuser.sh
EXPOSE 8000
ENTRYPOINT ["/root/runasuser.sh"]