forked from rust-lang/homu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (21 loc) · 1004 Bytes
/
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
FROM ubuntu:focal
# We need an older Ubuntu as github3 depends on < Python 3.10 to avoid errors
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
git \
ssh
COPY setup.py cfg.production.toml /src/
COPY homu/ /src/homu/
# Homu needs to be installed in "editable mode" (-e): when pip installs an
# application it resets the permissions of all source files to 644, but
# homu/git_helper.py needs to be executable (755). Installing in editable mode
# works around the issue since pip just symlinks the package to the source
# directory.
RUN pip3 install -e /src/
# Ensure the host SSH key for github.com is trusted by the container. If this
# is not run, homu will fail to authenticate SSH connections with GitHub.
RUN mkdir /root/.ssh && \
ssh-keyscan github.com >> /root/.ssh/known_hosts
# Allow logs to show up timely on CloudWatch.
ENV PYTHONUNBUFFERED=1
CMD ["homu", "--verbose", "--config", "/src/cfg.production.toml"]