Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ and
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>2.0.3</version>
</dependency>
Comment thread
jglick marked this conversation as resolved.
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-zip</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,52 @@

package org.jenkinsci.test.acceptance.docker.fixtures;

import org.jenkinsci.test.acceptance.docker.DockerFixture;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import org.jenkinsci.test.acceptance.plugins.ssh_slaves.SshSlaveLauncher;
import org.jenkinsci.test.acceptance.po.DumbSlave;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.images.builder.ImageFromDockerfile;

/**
* Jenkins agent with various login methods.
*/
@DockerFixture(id = "ssh-agent", ports = 22)
public class SshAgentContainer extends JavaContainer {
public class SshAgentContainer extends GenericContainer<SshAgentContainer> {

public String getEncryptedEd25519PrivateKey() {
return resource("ed25519.priv").asText();
public SshAgentContainer() {
super(new ImageFromDockerfile("localhost/testcontainers/ath-ssh-agent", false)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought not deleting the image would causes issues with stale images when the Dockerfile or other input was changed, but apparently there is something in testcontainers here that handles this. (could not find docs on it though)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK specifying true (or not specifying it, e.g., just use the no-arg ctor) just means that it will do something like docker rmi after the test completes, throwing away your cache. Whereas passing false is the equivalent of just docker build.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed: edits to Dockerfile are honored when you next mvn test.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed: edits to Dockerfile are honored when you next mvn test.

sorry I was unclear - I had already tested this happened did not mean for you to test it, and this was a comment for anyone else who may see this in the future.

.withFileFromClasspath(".", SshAgentContainer.class.getName().replace('.', '/')));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: generally you should only add the things that are needed - otherwise all of them can be sent to the testcontainer server for building (and it takes longer). (the build is currently only a local(ish) docker compliant server so currently this does not add too much overhead)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally you should only add the things that are needed

WDYM? This is sending https://github.com/jenkinsci/acceptance-test-harness/tree/5f032d5666d5e8e8fe0ccdf635d6a0866654c851/src/main/resources/org/jenkinsci/test/acceptance/docker/fixtures/SshAgentContainer which is exactly what is needed by the Docker daemon.

Copy link
Copy Markdown
Member

@jtnord jtnord Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally you should only add the things that are needed

WDYM? This is sending https://github.com/jenkinsci/acceptance-test-harness/tree/5f032d5666d5e8e8fe0ccdf635d6a0866654c851/src/main/resources/org/jenkinsci/test/acceptance/docker/fixtures/SshAgentContainer which is exactly what is needed by the Docker daemon.

it only needs some of the files in that directory (the Dockerfile and the .pubs and the .pub is questionable) .

e.g.

   // ...
   .withFileFromClasspath("Dockerfile", SshAgentContainer.class.getName().replace('.', '/'))
   .withFileFromClasspath("ed25519.pub", SshAgentContainer.class.getName().replace('.', '/') + "/ed25519.pub")
   .withFileFromClasspath("unsafe_enc_key.pub", SshAgentContainer.class.getName().replace('.', '/') + "/unsafe_enc_key.pub")
   //...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK we could .dockerignore the private keys for example, but these are tiny files. We just do not want to be streaming megabytes of unused binaries, and we are not.

Copy link
Copy Markdown
Member

@jtnord jtnord Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hence was a NIT, not blocking anything on this

withExposedPorts(22);
}

public String getEncryptedEd25519PrivateKeyPassphrase() {
return resource("ed25519.pass").asText();
public String getEncryptedEd25519PrivateKey() throws IOException {
return new String(
SshAgentContainer.class
.getResourceAsStream("SshAgentContainer/ed25519.priv")
.readAllBytes(),
StandardCharsets.US_ASCII);
Comment thread
jglick marked this conversation as resolved.
Outdated
}

public String getEncryptedEd25519PrivateKeyPassphrase() throws IOException {
return new String(
SshAgentContainer.class
.getResourceAsStream("SshAgentContainer/ed25519.pass")
.readAllBytes(),
StandardCharsets.US_ASCII);
}

public String getPrivateKeyString() throws IOException {
return new String(
SshAgentContainer.class
.getResourceAsStream("SshAgentContainer/unsafe")
.readAllBytes(),
StandardCharsets.US_ASCII);
}

public SshSlaveLauncher configureSSHSlaveLauncher(DumbSlave agent) {
SshSlaveLauncher launcher = agent.setLauncher(SshSlaveLauncher.class);
launcher.host.set(ipBound(22));
launcher.port(port(22));
launcher.host.set(getHost());
launcher.port(getMappedPort(22));
launcher.setSshHostKeyVerificationStrategy(SshSlaveLauncher.NonVerifyingKeyVerificationStrategy.class);
return launcher;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,23 @@

package org.jenkinsci.test.acceptance.docker.fixtures;

import org.jenkinsci.test.acceptance.docker.DockerFixture;
import org.jenkinsci.test.acceptance.plugins.ssh_slaves.SshSlaveLauncher;
import org.jenkinsci.test.acceptance.po.DumbSlave;
import org.jenkinsci.test.acceptance.po.Jenkins;
import org.jenkinsci.test.acceptance.po.Slave;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.images.builder.ImageFromDockerfile;

/**
* A fixture consisting of a Jenkins slave which can run XVNC.
*/
@DockerFixture(id = "xvnc-slave", ports = 22)
public class XvncSlaveContainer extends JavaContainer {
public class XvncSlaveContainer extends GenericContainer<XvncSlaveContainer> {

public XvncSlaveContainer() {
super(new ImageFromDockerfile("localhost/testcontainers/ath-xvnc-agent", false)
.withFileFromClasspath(".", XvncSlaveContainer.class.getName().replace('.', '/')));
withExposedPorts(22);
}

/**
* Attaches the slave to Jenkins.
Expand All @@ -45,8 +51,8 @@ public Slave connect(Jenkins j) {
// Some code from SshSlaveController could be applicable here, but looks too tricky to reuse.
DumbSlave s = j.slaves.create(DumbSlave.class);
SshSlaveLauncher launcher = s.setLauncher(SshSlaveLauncher.class);
launcher.host.set(ipBound(22));
launcher.port(port(22));
launcher.host.set(getHost());
launcher.port(getMappedPort(22));
launcher.pwdCredentials("test", "test");
launcher.setSshHostKeyVerificationStrategy(SshSlaveLauncher.NonVerifyingKeyVerificationStrategy.class);
s.remoteFS.set("/home/test");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# curl -s https://raw.githubusercontent.com/jenkinsci/docker-fixtures/master/src/main/resources/org/jenkinsci/test/acceptance/docker/fixtures/JavaContainer/Dockerfile | sha1sum | cut -c 1-12
FROM jenkins/java:978f1af53461
COPY *.pub /tmp
# originally SshdContainer/Dockerfile

#
# Runs sshd and allow the 'test' user to login
#

FROM ubuntu:noble

# install SSHD
RUN apt-get update -y && \
apt-get install -y \
openssh-server \
locales
RUN mkdir -p /var/run/sshd

# create a test user
RUN useradd test -d /home/test && \
mkdir -p /home/test/.ssh && \
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzpxmTW9mH87DMkMSqBrSecoSHVCkKbW5IOO+4unak8M8cyn+b0iX07xkBn4hUJRfKA7ezUG8EX9ru5VinteqMOJOPknCuzmUS2Xj/WJdcq3BukBxuyiIRoUOXsCZzilR/DOyNqpjjI3iNb4los5//4aoKPCmLInFnQ3Y42VaimH1298ckEr4tRxsoipsEAANPXZ3p48gGwOf1hp56bTFImvATNwxMViPpqyKcyVaA7tXCBnEk/GEwb6MiroyHbS0VvBz9cZOpJv+8yQnyLndGdibk+hPbGp5iVAIsm28FEF+4FvlYlpBwq9OYuhOCREJvH9CxDMhbOXgwKPno9GyN kohsuke@atlas' > /home/test/.ssh/authorized_keys && \
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDagNSCDst/8z5oH9S5QWr+QNdx+haImY0FD3IQvKdD+eWI9zUbBgtoo/yYEbLvpTWiKsgT3Hw1F8mZ+/bd2Uv3lPyoG+TSzrHL4gSal6d1RWVjCOzSosciXVm4gRUvJjKXzaz8dOg+ii9yIrbeONNK0nlDUCAKy5YXSEl0avcPdUDyR3cStL6870SyanxAzktDw0n8xMq4F/alF3PZ002bcZJrmDeNVAwkP+uO2Tf8pN37SU+nApotZmlmZR32xYHnx+/OiQ7gOAVYmgNRMg0Kwh6Q73FcY3ZWCeNHwLnr95LoEAdj3On8Qr62VhGThuQNVCqBc6SeYjArfjijpcW9 jenkins-ci@localhost' >> /home/test/.ssh/authorized_keys && \
Comment on lines +19 to +20
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do this as well as the following below (those public keys are identical are they not, and if not would it not be better to just manage them all in the same way to avoid confusion)?

COPY *.pub /tmp/
RUN cat /tmp/*.pub >> /home/test/.ssh/authorized_keys

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To try to keep this PR straightforward to review,

For now I just inlined the original Dockerfile contents; could be cleaned up in various ways later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOW, this is making the minimum changes:

  • changing Java 17 to 21
  • switch from docker-fixtures to exact equivalent Dockerfile layers

chown -R test:test /home/test && \
chmod 0600 /home/test/.ssh/authorized_keys && \
echo "test:test" | chpasswd

# https://stackoverflow.com/a/38553499/12916
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8

# run SSHD in the foreground with error messages to stderr
ENTRYPOINT ["/usr/sbin/sshd", "-D", "-e"]

# originally JavaContainer/Dockerfile as of https://github.com/jenkinsci/docker-fixtures/pull/138

RUN apt-get update && \
apt-get install --no-install-recommends -y \
software-properties-common \
openjdk-21-jdk-headless \
curl \
ant \
maven

# additional setup for SshAgentContainer

COPY *.pub /tmp/
RUN cat /tmp/*.pub >> /home/test/.ssh/authorized_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA86cZk1vZh/OwzJDEqga0nnKEh1QpCm1uSDjvuLp2pPDPHMp/
m9Il9O8ZAZ+IVCUXygO3s1BvBF/a7uVYp7XqjDiTj5Jwrs5lEtl4/1iXXKtwbpAc
bsoiEaFDl7Amc4pUfwzsjaqY4yN4jW+JaLOf/+GqCjwpiyJxZ0N2ONlWoph9dvfH
JBK+LUcbKIqbBAADT12d6ePIBsDn9Yaeem0xSJrwEzcMTFYj6asinMlWgO7VwgZx
JPxhMG+jIq6Mh20tFbwc/XGTqSb/vMkJ8i53RnYm5PoT2xqeYlQCLJtvBRBfuBb5
WJaQcKvTmLoTgkRCbx/QsQzIWzl4MCj56PRsjQIDAQABAoIBAAGTiy7Q4U9n3DT2
ms8ey/xacVEO0lUm8Be3hpWDX1Eh3bUp+jlf2q8C/P5tscwZkVXVQFMAqjc1B42U
Hka3fpT5qLq9D82RuEWu8oF0aUZINaoBdK2i0SWcDXvlv9nvgyxvQPiJqgOOLzF7
D0CGKPrW0urOCNbFmkY4wYMMpOrYXnwb6bc1p7snbzeRigaoGvSgvH7fx2Steg1o
j50C4BKVtXPKQdmckG2SFn0T+U1iCsRG+KNcENX2vX8gyrXImAH093WTjKsmM9et
ddWB+molSnXR/MNrf6BB2mpvXLNyR2/RgBd2jwSQnpDkpms4Br5nek3YYN1dBRL4
6bofHWECgYEA+7n5OIEbvpMtGxJwOovj0KZMzPkHyQH/DZzo48rS+39goNk/0KLF
c3L3sHbT3Lr4qA/6JOCjlzw7o2AbOrRL4ke1uqcCVQMdDqZdvNezMvTzqEbQGdHD
aFnEcUV2tvEwP11q37ianBRPH5stOnEwQNuv6AJo5LKwi4mTS7qEW9cCgYEA98oJ
h+vMKpXGdJzkSDMzYBrC2tYgqjby6+zGKz8BZ58YecsL+oi2GXBaDTfK+16CKeFM
8+qQN9Kl1ZNOlk64XJXjt77h0FcFuGe+6rUpM1aEizrf9sWPVZO+QQfhnjsiAhtQ
YX783ydy9rMn1FDPMtNNq4GMhGsFCaL4RupOjjsCgYAnk9XbTHFQRVOSLhP3IIdx
BrSMhZrzv5yaR1FWf00svZozr/SYmP7yZ+EJnaUxzzPJOLnbknYmERJPXYzqbe6A
ZUXtUtTLCPJIm1+hkUhbeqfUjU2qwZA3l+WK6aEAomszizyCcEPexlKqZXt29NTh
XakKkVZsnqujRL4j6e9lgQKBgQDvhD8EQJyAyXgkvoc3dy6BBj019WdrwWO9Q4km
wmdkN3gcOnYgvUdwfZa+UiEGLAub2eldmW3AWADu2s5LIlq5PDX7Jir3DTc9UiNM
ksL5mfbS8p0M11i+uupbx/eB0N0FtktTgsGCH4rUBsdIRriSA4h/cOFYGm6rKvnc
6p32gwKBgHZYmXzuBWZlWEmPiXbTaI4egJugur5FrT6BJfiLsN2MHBJi9k1IpKEP
SaT+v0IXJ8jP4gSiu4/gyJQpkn7yiMNhwYWlQt+1zyIkHjUsEG82Z8Mqpjx2EJgG
MxDybQux1uk0hyCmMS757WkbTyi0pTWz7PgTIdfmYqhZVV8KRSUi
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzpxmTW9mH87DMkMSqBrSecoSHVCkKbW5IOO+4unak8M8cyn+b0iX07xkBn4hUJRfKA7ezUG8EX9ru5VinteqMOJOPknCuzmUS2Xj/WJdcq3BukBxuyiIRoUOXsCZzilR/DOyNqpjjI3iNb4los5//4aoKPCmLInFnQ3Y42VaimH1298ckEr4tRxsoipsEAANPXZ3p48gGwOf1hp56bTFImvATNwxMViPpqyKcyVaA7tXCBnEk/GEwb6MiroyHbS0VvBz9cZOpJv+8yQnyLndGdibk+hPbGp5iVAIsm28FEF+4FvlYlpBwq9OYuhOCREJvH9CxDMhbOXgwKPno9GyN kohsuke@atlas
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,6C6AE91D9BBAF093BB945784175F8EBA

lG8UxQ+QvDItjZWpbwLMK+tU5XDnc+LL31q+NLfKxvVwPM1/pyYAEsG2K7kW8HAe
r1DPDSmaXscDqU8VunUVd8S3ImrG8HzL4lOP5LpWMbRMRYuuLqJQes38BScqG0dK
fGvdTy5cAlHFMzqtg1Gw0P2tBORz1wF1WmeGjTaEgH+Lb6mCyI2a4eaCdLDdVIAi
KuP9ylE8qHMDgHkb25XvIKCuFGiu4+e60e9KWfI2542goaRdXe7pCXg7V21WYwce
+TroepBjSftbM2CL75+NAPOZt89l1mT7ZaxnDiQWOvmS5nYX3j/7213XaoGLyfU7
EBevPImxFxkvklt1PHDqT8viyNu/sVZq1sjXBRI69Z3xqFEVQS6cstaJ10XEt5O0
ppHWAbGI98lzOX7MdwF75fnaiOFKqSGFVW1YqnbgDobIWGtSVCYQIErB8hvOo+2j
5JFuDe2qsw1KRo2lPeLTv3UItpM171PqcOH2gP9h8ds3ZkgYozco2NadacNRtuLK
rvRscCmWojUf2s/mbBEgO8tZusrK+jAz5BN8nRb8d6u6Fqep/3h6W7hN181LRwbV
RbLb/IcwW/uMgNRWsSeoayx5Fcj5ztor5KAGZXa6nZFfkMoj4GXMdDNWNinvo/5B
KDbeWu2TO7s5FlSHrqQT63Ne9X8PL7+jXweB9ceXGHueSKpVSzMdvDEvDJoCpXAk
d2fin2pzwxUFxclbi6F+v3R9DN+Q88iOWYZjeOjNu8hjJJe3xGY93xXS1ep/0AZh
hly1+vxN44RXwFSENpkKCi7Z2URfISmO+J+YUQR6vXjlE0mbjLiW/z53veZmRa2b
iY+qPaJsMq+PRQsuERxL7lFSfQRx/EIa0hUupdmQTIUZOJVT+YX+f/IiDsApQkzI
81orGiCAEsCIk0ysog8CePLpf0VlFyP7J0U7PmV1ulqiC6smejQSqmthW2EyDQBc
PNOcm1pUOJl2avJykw5MgpgHW+AYX9YkHPYc3V9ms9wCM1fTa8Hup0SmHlsdmh+V
VeXb+disn+b1RoN7C7uL7j82buBN+D8LtH9XozJfd8y/2vUAIxuB8dY71bpHtFmu
yngIbMYzXA3+eLn1eZNry8xxRbaGZtHtSTmCBBHDbO5Q1LJ8tDna3ciPVtG2B9zZ
jIq7tlpYUk3NawQXnDkTdFf8eU5oD8qJMRGcIQErBZwFsPG0owUQgKoPHUQXLGs9
sHFrC9LTsJQFn7Yhnzp+8uQMpUBz6nHNE8AxYjJMXWMszhwAvOaKCQvocDrOBGxo
mo71QzDOjeAt12IEdbRmvmefh+l4lNP21YzcsXdMKoe6N5B0MMVf3brnz/XSgFUP
5K5GoVQj+V6tCJSOEV2QSwXuGQSqsaCiYbWB+jiQ1v/DMVGjRWSqyRwvj3SIiZTR
PsdN3tYHtnmBVshoH9Wk6LI+UH3XREgahBeRvHxeBC7xSpk+ST+PiWSW0bihIpd+
dsc6r02rEHn25T6+viQ8fYbUmrE9UFiNP59llsnvJMxNwpGSX2PwxCDvdneU3Zp4
J7Q6iG3TzvjOq9Br4TvLdovmNa0qQrSAGPRmRpAjHvtMU47afjBVy9tzhVRXHFRv
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDagNSCDst/8z5oH9S5QWr+QNdx+haImY0FD3IQvKdD+eWI9zUbBgtoo/yYEbLvpTWiKsgT3Hw1F8mZ+/bd2Uv3lPyoG+TSzrHL4gSal6d1RWVjCOzSosciXVm4gRUvJjKXzaz8dOg+ii9yIrbeONNK0nlDUCAKy5YXSEl0avcPdUDyR3cStL6870SyanxAzktDw0n8xMq4F/alF3PZ002bcZJrmDeNVAwkP+uO2Tf8pN37SU+nApotZmlmZR32xYHnx+/OiQ7gOAVYmgNRMg0Kwh6Q73FcY3ZWCeNHwLnr95LoEAdj3On8Qr62VhGThuQNVCqBc6SeYjArfjijpcW9 jenkins-ci@localhost
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jenkins-ci
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
# curl -s https://raw.githubusercontent.com/jenkinsci/docker-fixtures/master/src/main/resources/org/jenkinsci/test/acceptance/docker/fixtures/JavaContainer/Dockerfile | sha1sum | cut -c 1-12
FROM jenkins/java:978f1af53461
# originally SshdContainer/Dockerfile

#
# Runs sshd and allow the 'test' user to login
#

FROM ubuntu:noble

# install SSHD
RUN apt-get update -y && \
apt-get install -y \
openssh-server \
locales
RUN mkdir -p /var/run/sshd

# create a test user
RUN useradd test -d /home/test && \
mkdir -p /home/test/.ssh && \
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzpxmTW9mH87DMkMSqBrSecoSHVCkKbW5IOO+4unak8M8cyn+b0iX07xkBn4hUJRfKA7ezUG8EX9ru5VinteqMOJOPknCuzmUS2Xj/WJdcq3BukBxuyiIRoUOXsCZzilR/DOyNqpjjI3iNb4los5//4aoKPCmLInFnQ3Y42VaimH1298ckEr4tRxsoipsEAANPXZ3p48gGwOf1hp56bTFImvATNwxMViPpqyKcyVaA7tXCBnEk/GEwb6MiroyHbS0VvBz9cZOpJv+8yQnyLndGdibk+hPbGp5iVAIsm28FEF+4FvlYlpBwq9OYuhOCREJvH9CxDMhbOXgwKPno9GyN kohsuke@atlas' > /home/test/.ssh/authorized_keys && \
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDagNSCDst/8z5oH9S5QWr+QNdx+haImY0FD3IQvKdD+eWI9zUbBgtoo/yYEbLvpTWiKsgT3Hw1F8mZ+/bd2Uv3lPyoG+TSzrHL4gSal6d1RWVjCOzSosciXVm4gRUvJjKXzaz8dOg+ii9yIrbeONNK0nlDUCAKy5YXSEl0avcPdUDyR3cStL6870SyanxAzktDw0n8xMq4F/alF3PZ002bcZJrmDeNVAwkP+uO2Tf8pN37SU+nApotZmlmZR32xYHnx+/OiQ7gOAVYmgNRMg0Kwh6Q73FcY3ZWCeNHwLnr95LoEAdj3On8Qr62VhGThuQNVCqBc6SeYjArfjijpcW9 jenkins-ci@localhost' >> /home/test/.ssh/authorized_keys && \
chown -R test:test /home/test && \
chmod 0600 /home/test/.ssh/authorized_keys && \
echo "test:test" | chpasswd

# https://stackoverflow.com/a/38553499/12916
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8

# run SSHD in the foreground with error messages to stderr
ENTRYPOINT ["/usr/sbin/sshd", "-D", "-e"]

# originally JavaContainer/Dockerfile as of https://github.com/jenkinsci/docker-fixtures/pull/138

RUN apt-get update && \
apt-get install --no-install-recommends -y \
software-properties-common \
openjdk-21-jdk-headless \
curl \
ant \
maven

# additional setup for XvncSlaveContainer

RUN apt-get update && apt-get install -y tigervnc-standalone-server imagemagick

# So it is owned by root and has the permissions vncserver seems to require:
RUN mkdir /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix/

# TODO seems this can be picked up from the host, which is unwanted:
ENV XAUTHORITY /home/test/.Xauthority
ENV XAUTHORITY=/home/test/.Xauthority

USER test
RUN mkdir /home/test/.vnc && (echo jenkins; echo jenkins) | vncpasswd /home/test/.vnc/passwd
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQ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sCgYAnk9XbTHFQRVOSLhP3IIdx
BrSMhZrzv5yaR1FWf00svZozr/SYmP7yZ+EJnaUxzzPJOLnbknYmERJPXYzqbe6A
ZUXtUtTLCPJIm1+hkUhbeqfUjU2qwZA3l+WK6aEAomszizyCcEPexlKqZXt29NTh
XakKkVZsnqujRL4j6e9lgQKBgQDvhD8EQJyAyXgkvoc3dy6BBj019WdrwWO9Q4km
wmdkN3gcOnYgvUdwfZa+UiEGLAub2eldmW3AWADu2s5LIlq5PDX7Jir3DTc9UiNM
ksL5mfbS8p0M11i+uupbx/eB0N0FtktTgsGCH4rUBsdIRriSA4h/cOFYGm6rKvnc
6p32gwKBgHZYmXzuBWZlWEmPiXbTaI4egJugur5FrT6BJfiLsN2MHBJi9k1IpKEP
SaT+v0IXJ8jP4gSiu4/gyJQpkn7yiMNhwYWlQt+1zyIkHjUsEG82Z8Mqpjx2EJgG
MxDybQux1uk0hyCmMS757WkbTyi0pTWz7PgTIdfmYqhZVV8KRSUi
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzpxmTW9mH87DMkMSqBrSecoSHVCkKbW5IOO+4unak8M8cyn+b0iX07xkBn4hUJRfKA7ezUG8EX9ru5VinteqMOJOPknCuzmUS2Xj/WJdcq3BukBxuyiIRoUOXsCZzilR/DOyNqpjjI3iNb4los5//4aoKPCmLInFnQ3Y42VaimH1298ckEr4tRxsoipsEAANPXZ3p48gGwOf1hp56bTFImvATNwxMViPpqyKcyVaA7tXCBnEk/GEwb6MiroyHbS0VvBz9cZOpJv+8yQnyLndGdibk+hPbGp5iVAIsm28FEF+4FvlYlpBwq9OYuhOCREJvH9CxDMhbOXgwKPno9GyN kohsuke@atlas
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,6C6AE91D9BBAF093BB945784175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UAIxuB8dY71bpHtFmu
yngIbMYzXA3+eLn1eZNry8xxRbaGZtHtSTmCBBHDbO5Q1LJ8tDna3ciPVtG2B9zZ
jIq7tlpYUk3NawQXnDkTdFf8eU5oD8qJMRGcIQErBZwFsPG0owUQgKoPHUQXLGs9
sHFrC9LTsJQFn7Yhnzp+8uQMpUBz6nHNE8AxYjJMXWMszhwAvOaKCQvocDrOBGxo
mo71QzDOjeAt12IEdbRmvmefh+l4lNP21YzcsXdMKoe6N5B0MMVf3brnz/XSgFUP
5K5GoVQj+V6tCJSOEV2QSwXuGQSqsaCiYbWB+jiQ1v/DMVGjRWSqyRwvj3SIiZTR
PsdN3tYHtnmBVshoH9Wk6LI+UH3XREgahBeRvHxeBC7xSpk+ST+PiWSW0bihIpd+
dsc6r02rEHn25T6+viQ8fYbUmrE9UFiNP59llsnvJMxNwpGSX2PwxCDvdneU3Zp4
J7Q6iG3TzvjOq9Br4TvLdovmNa0qQrSAGPRmRpAjHvtMU47afjBVy9tzhVRXHFRv
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDagNSCDst/8z5oH9S5QWr+QNdx+haImY0FD3IQvKdD+eWI9zUbBgtoo/yYEbLvpTWiKsgT3Hw1F8mZ+/bd2Uv3lPyoG+TSzrHL4gSal6d1RWVjCOzSosciXVm4gRUvJjKXzaz8dOg+ii9yIrbeONNK0nlDUCAKy5YXSEl0avcPdUDyR3cStL6870SyanxAzktDw0n8xMq4F/alF3PZ002bcZJrmDeNVAwkP+uO2Tf8pN37SU+nApotZmlmZR32xYHnx+/OiQ7gOAVYmgNRMg0Kwh6Q73FcY3ZWCeNHwLnr95LoEAdj3On8Qr62VhGThuQNVCqBc6SeYjArfjijpcW9 jenkins-ci@localhost
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jenkins-ci
Loading