Skip to content

Commit 119532a

Browse files
committed
update CI/CD files
1 parent 6c2f003 commit 119532a

File tree

4 files changed

+1294
-4769
lines changed

4 files changed

+1294
-4769
lines changed

Dockerfile

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,61 @@ ARG GID=1000
1111
ARG DEBIAN_FRONTEND=noninteractive
1212

1313
# Hugo version
14-
ARG HUGO=0.134.2
14+
ARG HUGO=0.140.2
1515

1616
# Speedup Python
1717
ENV PYTHONDONTWRITEBYTECODE=1
1818
ENV PYTHONUNBUFFERED=1
1919

2020
# Make RUN commands use `bash --login`:
21-
SHELL ["/bin/bash", "--login", "-c"]
21+
SHELL ["/bin/bash", "--login", "-exc"]
2222

2323
WORKDIR /src
2424

25-
RUN : \
26-
&& groupadd -g $GID -o $UNAME \
27-
&& useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME \
28-
&& apt-get update -q \
29-
&& apt-get install -q -y --no-install-recommends make nodejs npm wget git rsync python3-pip \
30-
&& wget -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO}/hugo_extended_${HUGO}_linux-amd64.deb \
31-
&& dpkg -i hugo.deb \
32-
&& rm hugo.deb \
33-
&& rm -rf /var/lib/apt/lists/* \
34-
&& :
25+
RUN <<EOT
26+
# Initial packages
27+
apt-get update -q
28+
apt-get install -qyy \
29+
-o APT::Install-Recommends=false \
30+
-o APT::Install-Suggests=false \
31+
curl ca-certificates gdebi gnupg2 build-essential make git rsync python3-pip
32+
33+
# Download NodeJS
34+
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
35+
apt-get update -q
36+
apt-get install -qyy \
37+
-o APT::Install-Recommends=false \
38+
-o APT::Install-Suggests=false \
39+
nodejs
40+
41+
# Install Hugo static site generator
42+
curl -o hugo.deb -L https://github.com/gohugoio/hugo/releases/download/v${HUGO}/hugo_extended_${HUGO}_linux-amd64.deb
43+
gdebi --non-interactive hugo.deb
44+
rm hugo.deb
45+
46+
# Cleanup
47+
apt-get clean
48+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
49+
50+
# Ensure user and group exists
51+
groupadd --non-unique -g ${GID} -o ${UNAME}
52+
useradd -m --uid ${UID} --gid ${GID} -o -s /bin/bash ${UNAME}
53+
chown -R ${UID}:${GID} /src
54+
55+
EOT
56+
3557

3658
USER ${UID}:${GID}
3759

3860
ENV PATH="${PATH}:/home/${UNAME}/.local/bin"
3961

40-
RUN python3 -m pip install --user --no-cache-dir --break-system-packages "arxiv~=2.1.0" requests unidecode ujson
62+
RUN <<EOT
63+
python3 -m pip install \
64+
--user \
65+
--no-cache-dir \
66+
--break-system-packages \
67+
"arxiv~=2.1.0" \
68+
requests \
69+
unidecode \
70+
ujson
71+
EOT

0 commit comments

Comments
 (0)