-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathDockerfile.dev
More file actions
32 lines (27 loc) · 1.17 KB
/
Dockerfile.dev
File metadata and controls
32 lines (27 loc) · 1.17 KB
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
FROM ubuntu:20.04
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
# Install all dependencies in one layer
RUN apt-get update && apt-get install -y \
curl wget python3 python3-dev python3-pip nodejs npm git \
&& ARCH=$(dpkg --print-architecture) \
&& if [ "$ARCH" = "arm64" ]; then \
HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_linux-arm64.tar.gz"; \
else \
HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_linux-amd64.tar.gz"; \
fi \
&& wget $HUGO_URL -O hugo.tar.gz \
&& tar -xzf hugo.tar.gz \
&& mv hugo /usr/local/bin/ \
&& rm hugo.tar.gz \
&& useradd -ms /bin/bash appuser \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/home/appuser/.local/bin:${PATH}"
USER appuser
WORKDIR /app
# Pre-install dependencies during build (optional optimization)
COPY requirements.txt /tmp/requirements.txt
RUN python3 -m pip install --user -r /tmp/requirements.txt
# Start with a simple script
CMD ["sh", "-c", "bash run.sh --bind 0.0.0.0 --buildDrafts --buildFuture --disableFastRender --ignoreCache --noHTTPCache"]