-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.template
39 lines (30 loc) · 1.01 KB
/
Dockerfile.template
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
FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3.11-bookworm-run
# Install base packages
RUN install_packages \
build-essential \
chrony \
curl \
git \
jq \
openjdk-17-jre-headless \
openssh-server \
vim \
wget \
redis-server \
lsof
RUN mkdir /var/run/sshd \
&& echo 'root:balena' | chpasswd \
&& sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config \
&& echo ". <(xargs -0 bash -c 'printf \"export %q\n\" \"\$@\"' -- < /proc/1/environ)" >> /root/.profile
WORKDIR /usr/src/app
COPY . ./
ENV UDEV=1
ENV JENKINS_HOME=/data/jenkins/
ENV JENKINS_VERSION=2.452.3
ENV AGENT_VERSION=4.14
RUN mkdir -p /data/jenkins
RUN wget -q https://get.jenkins.io/war-stable/${JENKINS_VERSION}/jenkins.war
RUN wget -q https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${AGENT_VERSION}/remoting-${AGENT_VERSION}.jar -O agent.jar
RUN ["chmod", "+x", "./start.sh"]
CMD ["./start.sh"]