forked from docbrown1955/marty-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (56 loc) · 2.89 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
52
53
54
55
56
57
58
59
60
61
62
63
64
ARG DEBIAN_FRONTEND=noninteractive
ARG FROM=node:lts-bookworm-slim
FROM ${FROM}
ENV RUNNER_NAME=""
ENV RUNNER_TOKEN=""
ENV RUNNER_LABELS=""
ENV RUNNER_REPOSITORY_URL=""
ENV RUNNER_ALLOW_RUNASROOT="1"
ENV RUNNER_WORK_DIRECTORY="_work"
ARG GH_RUNNER_VERSION
ENV GITHUB_ACCESS_TOKEN=""
ENV PGLOG log_statement=all
ENV PIP_BREAK_SYSTEM_PACKAGES=1
ENV PIP_ROOT_USER_ACTION=ignore
WORKDIR /home/runner
COPY *.apt /home/runner/
ADD _site /home/runner/_site
ADD hooks /home/runner/hooks
ADD scripts /home/runner/scripts
RUN chmod +x /home/runner/hooks/*.sh
RUN chmod +x /home/runner/scripts/*.sh
COPY conf/*.conf /etc/supervisor/conf.d/
RUN chmod 644 /etc/supervisor/conf.d/*.conf
#ENV ACTIONS_RUNNER_REQUIRE_JOB_CONTAINER=false
#ENV ACTIONS_RUNNER_CONTAINER_HOOKS=/opt/runner/index.js
ENV ACTIONS_RUNNER_HOOK_JOB_STARTED=/home/runner/hooks/job_started.sh
ENV ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/home/runner/hooks/job_completed.sh
LABEL maintainer="me@eq19.com" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.name="tcardonne/github-runner" \
org.label-schema.description="Dockerized GitHub Actions runner." \
org.label-schema.url="https://github.com/tcardonne/docker-github-runner" \
org.label-schema.vcs-url="https://github.com/tcardonne/docker-github-runner" \
org.label-schema.vendor="Thomas Cardonne" \
org.label-schema.docker.cmd="docker run -it tcardonne/github-runner:latest"
# Find the required package in ubuntu
RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq -o=Dpkg::Use-Pty=0 > /dev/null 2>&1
RUN sed "s/#.*//" /home/runner/requirements.apt | xargs apt-get install -yq -o=Dpkg::Use-Pty=0 > /dev/null 2>&1
RUN cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
# Install dependencies
#RUN cd /home/runner && mkdir xml && DOXYGEN=$(doxygen > /dev/null 2>&1)
#RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./.install
RUN npm install --package-lock-only redis talib pg mathjs gauss commander handlebars object-assign winston xml2js && npm ci
RUN GH_RUNNER_VERSION=${GH_RUNNER_VERSION:-$(curl --silent "https://api.github.com/repos/actions/runner/releases/latest" | grep tag_name | sed -E 's/.*"v([^"]+)".*/\1/')} && \
curl -L -O https://github.com/actions/runner/releases/download/v$GH_RUNNER_VERSION/actions-runner-linux-x64-$GH_RUNNER_VERSION.tar.gz && \
tar -zxf actions-runner-linux-x64-$GH_RUNNER_VERSION.tar.gz && \
rm -f actions-runner-linux-x64-$GH_RUNNER_VERSION.tar.gz && \
./bin/installdependencies.sh && \
chown -R root: /home/runner && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /home/runner/build
ENTRYPOINT ["/home/runner/scripts/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]