Skip to content

Commit 31e2b75

Browse files
committed
Fix docker build
1 parent bdd0c83 commit 31e2b75

File tree

6 files changed

+31
-21
lines changed

6 files changed

+31
-21
lines changed

Docker.sh

-4
This file was deleted.

Dockerfile

-16
This file was deleted.

docker/Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
RUN apt update \
4+
&& apt install -y wget git \
5+
&& git config --global --add safe.directory '*'
6+
7+
# Copy the local repo contents
8+
COPY ./requirements.txt /requirements.txt
9+
COPY ./docker/docker-entrypoint.sh /docker-entrypoint.sh
10+
11+
RUN pip install -r requirements.txt
12+
13+
# Install Hugo
14+
RUN wget https://github.com/gohugoio/hugo/releases/download/v0.102.3/hugo_extended_0.102.3_Linux-64bit.deb -O /tmp/hugo.deb \
15+
&& dpkg -i /tmp/hugo.deb
16+
17+
WORKDIR /work
18+
VOLUME [ "/work" ]
19+
20+
ENTRYPOINT ["/docker-entrypoint.sh"]

docker/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Docker build support
2+
3+
To build a container that contains everything required to build and update the website execute the following command.
4+
5+
`docker build . -f docker/Dockerfile -t homie-site:dev`
6+
7+
After that the docker image can be used to build the website in the current directory using something like this.
8+
9+
`docker run --rm -v $PWD:/work homie-site:dev`
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22
set -Eeo pipefail
33

4+
cd /work
5+
46
./grabrepos.py
57
hugo

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ pymdown-extensions==6.0
1010
PyYAML==5.3.1
1111
six==1.11.0
1212
smmap2==2.0.5
13-
tornado==5.1.1

0 commit comments

Comments
 (0)