Skip to content

Commit 6112bff

Browse files
authored
fix(ci): Docker build from Python image (#29)
* fix/ci/build-docker-image Changed: * changed latest to devel because we don't want to build public images for now but test images with cortexutils inside ! * changed dockerfile and created a withDeps dockerfile without sbt need * changed dockerfile and created a withDeps dockerfile without sbt need * fix/ci/build-docker-image Changed: * cortex.Dockerfile is now back to something slimer, without dependencies. As per Toom, there is no need to use an image built with dependencies because we use external docker images for analyzers Added: * we now have two Dockerfiles ready: one with and one without dependencies * fix/ci/build-docker-image Changed: * corrected file and context statements * wip * wip * wip * wip * wip trying to make it work * Back to target/ folder ... * changed dockerfile and created a withDeps dockerfile without sbt need * changed dockerfile and created a withDeps dockerfile without sbt need * fix/ci/build-docker-image Changed: * cortex.Dockerfile is now back to something slimer, without dependencies. As per Toom, there is no need to use an image built with dependencies because we use external docker images for analyzers Added: * we now have two Dockerfiles ready: one with and one without dependencies * fix/ci/build-docker-image Changed: * corrected file and context statements * wip * wip * wip * wip * wip trying to make it work * Back to target/ folder ... * Changed: volume mount corrected * from bookworm to python * python3.12 is now the base of the Cortex Docker image instead of debian
1 parent 63dd117 commit 6112bff

File tree

2 files changed

+1
-70
lines changed

2 files changed

+1
-70
lines changed

deployment/nomad/packs/cortex/templates/cortex.nomad.tpl

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ job [[ template "job_name" . ]] {
135135
"/var/run/docker.sock:/var/run/docker.sock",
136136
"local/application.conf:/etc/cortex/application.conf",
137137
"local/logback.xml:/etc/cortex/logback.xml",
138-
"local/analyzers.json:/etc/cortex/analyzers.json"
139-
]
140138
}
141139
142140
vault {
@@ -194,7 +192,6 @@ job [[ template "job_name" . ]] {
194192
analyzer.urls = [
195193
"https://download.thehive-project.org/analyzers.json"
196194
"https://download.thehive-project.org/repository/download.thehive-project.org/analyzers-devel.json"
197-
"/etc/cortex/analyzers.json"
198195
]
199196
responder.urls = [
200197
"https://download.thehive-project.org/responders.json"
@@ -235,72 +232,6 @@ job [[ template "job_name" . ]] {
235232
EOF
236233
}
237234
238-
template {
239-
destination = "local/analyzers.json"
240-
data = <<-EOF
241-
[
242-
[[ range $y := untilStep 1 11 1 ]]
243-
{
244-
"name": "testAnalyzer_[[ $y ]]",
245-
"version": "1.0",
246-
"author": "TheHive-Project",
247-
"url": "https://github.com/thehive-project/thehive",
248-
"license": "AGPL-V3",
249-
"baseConfig": "testAnalyzer",
250-
"config": {},
251-
"description": "Fake analyzer used for functional tests",
252-
"dataTypeList": ["domain", "ip", "hash", "other"],
253-
"dockerImage": "tooom/test_analyzer",
254-
"configurationItems": [
255-
{
256-
"name": "artifacts",
257-
"description": "Artifacts to include to output report in JSON format (ex: {\"data\":\"8.8.8.8\",\"dataType\":\"ip\"})",
258-
"type": "string",
259-
"multi": true,
260-
"required": false
261-
},
262-
{
263-
"name": "summary",
264-
"description": "The value of the summary returned by the analyzer",
265-
"type": "string",
266-
"multi": false,
267-
"required": false
268-
},
269-
{
270-
"name": "delay",
271-
"description": "The delay, in seconds",
272-
"type": "number",
273-
"multi": false,
274-
"required": false
275-
},
276-
{
277-
"name": "errorMessage",
278-
"description": "If set, make the analyzer fails with this message",
279-
"type": "string",
280-
"multi": false,
281-
"required": false
282-
},
283-
{
284-
"name": "report",
285-
"description": "The report",
286-
"type": "string",
287-
"multi": false,
288-
"required": false
289-
},
290-
{
291-
"name": "operations",
292-
"description": "The operations",
293-
"type": "string",
294-
"multi": true,
295-
"required": false
296-
}
297-
]
298-
} [[ if not (eq $y 10) ]],[[ end ]]
299-
[[ end ]]
300-
]
301-
EOF
302-
}
303-
304235
resources {
305236
cpu = 500
306237
memory = 1024

project/DockerSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ object DockerSettings {
6868
case (_, filepath) => filepath == "/opt/cortex/conf/application.conf" || filepath.contains("/package/")
6969
}),
7070
dockerCommands := Seq(
71-
Cmd("FROM", "python:3.12.9-bookworm"),
71+
Cmd("FROM", "python:3.12"),
7272
Cmd("LABEL", "MAINTAINER=\"TheHive Project <support@thehive-project.org>\"", "repository=\"https://github.com/TheHive-Project/TheHive\""),
7373
Cmd("WORKDIR", "/opt/cortex"),
7474
Cmd("ENV", "JAVA_HOME", "/usr/lib/jvm/java-11-amazon-corretto"),

0 commit comments

Comments
 (0)