Skip to content

Commit 6076dbc

Browse files
authored
Merge pull request #464 from tls-attacker/docker-builds
Provide Prebuilt Docker Images
2 parents 435f29b + 770d097 commit 6076dbc

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jelastic/maven:3.9.5-openjdk-21 AS build-image
1+
FROM maven:3.9.9-eclipse-temurin-21-jammy AS build-image
22
WORKDIR /build
33
RUN git clone https://github.com/RUB-NDS/TLS-Scanner.git
44

@@ -7,7 +7,7 @@ RUN git submodule update --init --recursive
77
RUN mvn clean package
88

99
#############
10-
FROM openjdk:21
10+
FROM eclipse-temurin:21
1111

1212
COPY --from=build-image /build/TLS-Scanner/apps /apps
1313

Dockerfile_Jenkins

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM eclipse-temurin:21
2+
3+
COPY ./apps/ /apps/
4+
WORKDIR /apps
5+
ENTRYPOINT ["java", "-jar", "TLS-Server-Scanner.jar"]

Jenkinsfile

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,44 @@ pipeline {
151151
uploadGithubReleaseAsset(
152152
credentialId: '1522a497-e78a-47ee-aac5-70f071fa6714',
153153
repository: GIT_URL.tokenize("/.")[-3,-2].join("/"),
154-
tagName: draftRelease.htmlUrl.tokenize("/")[-1],
154+
tagName: draftRelease.htmlUrl.tokenize("/")[-1],
155155
uploadAssets: [
156156
[filePath: "${env.WORKSPACE}/TLS-Scanner-${TAG_NAME}.zip"]
157157
]
158158
)
159159
}
160160
}
161161
}
162+
stage('Public Docker Images') {
163+
when {
164+
tag 'v*'
165+
environment name: 'GIT_URL', value: 'https://github.com/tls-attacker/TLS-Scanner.git'
166+
}
167+
steps {
168+
script {
169+
docker.withRegistry('https://ghcr.io','github-docker-token') {
170+
def image = docker.build("ghcr.io/tls-attacker/tlsscanner:${TAG_NAME}", "-f Dockerfile_Jenkins .")
171+
image.push()
172+
image.push('latest')
173+
}
174+
}
175+
}
176+
}
177+
stage('Internal Docker Images') {
178+
when {
179+
tag 'v*'
180+
environment name: 'GIT_URL', value: 'https://github.com/tls-attacker/TLS-Scanner-Development.git'
181+
}
182+
steps {
183+
script {
184+
docker.withRegistry('https://hydrogen.cloud.nds.rub.de','Jenkins-User-Nexus-Repository') {
185+
def image = docker.build("hydrogen.cloud.nds.rub.de/tls-attacker/tlsscanner:${TAG_NAME}", "-f Dockerfile_Jenkins .")
186+
image.push()
187+
image.push('latest')
188+
}
189+
}
190+
}
191+
}
162192
}
163193
post {
164194
always {

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ $ mvn clean install
3333

3434
# Running
3535

36-
In order to run TLS-Scanner you need to run the jar file in the apps/ folder.
36+
In order to run TLS-Scanner you need to run one of the jar files in the apps/ folder.
37+
These can be obtained by compiling the app yourself or by
38+
[downloading released jar files from GitHub](https://github.com/tls-attacker/TLS-Scanner/releases).
3739

3840
```bash
3941
$ java -jar apps/TLS-Server-Scanner.jar -connect localhost:4433
@@ -45,7 +47,20 @@ In order to see more details about the Guidelines, use "-reportDetail ALL".
4547

4648
# Docker
4749

48-
We provide you with a Dockerfile, which lets you run the scanner directly:
50+
We provide prebuilt docker images for easy use of the TLS-Server-Scanner.
51+
52+
```bash
53+
$ docker run --network host ghcr.io/tls-attacker/tlsscanner -connect localhost:4433
54+
```
55+
56+
The image is made to be used for server-scanning but also contains the other jar files.
57+
They can be accessed by altering the entrypoint.
58+
59+
```bash
60+
$ docker run --network host --entrypoint "java" ghcr.io/tls-attacker/tlsscanner -jar TLS-Client-Scanner.jar
61+
```
62+
63+
We also provide you with a Dockerfile, to build the container yourself:
4964

5065
```bash
5166
$ docker build . -t tlsscanner

0 commit comments

Comments
 (0)