diff --git a/.gitignore b/.gitignore index 8a27f1f..eabb54c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ /files/ /gnupg/ /logs/ -/public/ /ssl/ .env env.hcl diff --git a/README.md b/README.md index 99efab0..f2636f9 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # MISP Docker images -[![Build Status](https://img.shields.io/github/actions/workflow/status/MISP/misp-docker/release-latest.yml)](https://github.com/MISP/misp-docker/pkgs/container/misp-docker%2Fmisp-docker/versions) +[![Build Status](https://img.shields.io/github/actions/workflow/status/MISP/misp-docker/release-latest.yml)](https://github.com/orgs/MISP/packages) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/MISP/Docker) A production ready Docker MISP image (formerly hosted at https://github.com/ostefano/docker-misp, now deprecated) loosely based on CoolAcid and DSCO builds, with nearly all logic rewritten and verified for correctness and portability. Notable features: -- MISP and MISP modules are split into two different Docker images, `core` and `modules` +- MISP and MISP modules are split into two different Docker images, `misp-core` and `misp-modules` - Docker images are pushed regularly, no build required - Lightweigth Docker images by using multiple build stages and a slim parent image - Rely on off the shelf Docker images for Exim4, Redis, and MariaDB @@ -64,7 +64,7 @@ New options are added on a regular basis. ### Production -- It is recommended to specify the build you want run by editing `docker-compose.yml` (see here for the list of available tags https://github.com/MISP/misp-docker/pkgs/container/misp-docker%2Fmisp-docker/versions) +- It is recommended to specify the build you want run by editing `docker-compose.yml` (see here for the list of available tags https://github.com/orgs/MISP/packages) - Directory volume mount SSL Certs `./ssl`: `/etc/ssl/certs` - Certificate File: `cert.pem` - Certificate Key File: `key.pem` @@ -83,7 +83,7 @@ New options are added on a regular basis. ## Versioning -A GitHub Action builds both `core` and `modules` images automatically and pushes them to the [GitHub Package registry](https://github.com/MISP/misp-docker/pkgs/container/misp-docker%2Fmisp-docker/versions). We do not use tags inside the repository; instead we tag images as they are pushed to the registry. For each build, `core` and `modules` images are tagged as follows: -- `core-${commit-sha1}[0:7]` and `modules-${commit-sha1}[0:7]` where `${commit-sha1}` is the commit hash triggering the build -- `core-latest` and `modules-latest` in order to track the latest build available -- `core-${MISP_TAG}` and `modules-${MODULES_TAG}` reflecting the underlying version of MISP and MISP modules (as specified inside the `template.env` file at build time) +A GitHub Action builds both `misp-core` and `misp-modules` images automatically and pushes them to the [GitHub Package registry](https://github.com/orgs/MISP/packages). We do not use tags inside the repository; instead we tag images as they are pushed to the registry. For each build, `misp-core` and `misp-modules` images are tagged as follows: +- `misp-core:${commit-sha1}[0:7]` and `misp-modules:${commit-sha1}[0:7]` where `${commit-sha1}` is the commit hash triggering the build +- `misp-core:latest` and `misp-modules:latest` in order to track the latest builds available +- `misp-core:${MISP_TAG}` and `misp-modules:${MODULES_TAG}` reflecting the underlying version of MISP and MISP modules (as specified inside the `template.env` file at build time) diff --git a/server/Dockerfile b/core/Dockerfile similarity index 100% rename from server/Dockerfile rename to core/Dockerfile diff --git a/server/files/configure_misp.sh b/core/files/configure_misp.sh similarity index 100% rename from server/files/configure_misp.sh rename to core/files/configure_misp.sh diff --git a/server/files/entrypoint.sh b/core/files/entrypoint.sh similarity index 100% rename from server/files/entrypoint.sh rename to core/files/entrypoint.sh diff --git a/server/files/entrypoint_cron.sh b/core/files/entrypoint_cron.sh similarity index 100% rename from server/files/entrypoint_cron.sh rename to core/files/entrypoint_cron.sh diff --git a/server/files/entrypoint_fpm.sh b/core/files/entrypoint_fpm.sh similarity index 100% rename from server/files/entrypoint_fpm.sh rename to core/files/entrypoint_fpm.sh diff --git a/server/files/entrypoint_nginx.sh b/core/files/entrypoint_nginx.sh similarity index 100% rename from server/files/entrypoint_nginx.sh rename to core/files/entrypoint_nginx.sh diff --git a/server/files/etc/nginx/sites-available/misp b/core/files/etc/nginx/sites-available/misp similarity index 100% rename from server/files/etc/nginx/sites-available/misp rename to core/files/etc/nginx/sites-available/misp diff --git a/server/files/etc/nginx/sites-available/misp80 b/core/files/etc/nginx/sites-available/misp80 similarity index 100% rename from server/files/etc/nginx/sites-available/misp80 rename to core/files/etc/nginx/sites-available/misp80 diff --git a/server/files/etc/supervisor/conf.d/10-supervisor.conf b/core/files/etc/supervisor/conf.d/10-supervisor.conf similarity index 100% rename from server/files/etc/supervisor/conf.d/10-supervisor.conf rename to core/files/etc/supervisor/conf.d/10-supervisor.conf diff --git a/server/files/etc/supervisor/conf.d/50-workers.conf b/core/files/etc/supervisor/conf.d/50-workers.conf similarity index 100% rename from server/files/etc/supervisor/conf.d/50-workers.conf rename to core/files/etc/supervisor/conf.d/50-workers.conf diff --git a/server/files/rest_client.sh b/core/files/rest_client.sh similarity index 100% rename from server/files/rest_client.sh rename to core/files/rest_client.sh diff --git a/server/files/var/www/html/index.php b/core/files/var/www/html/index.php similarity index 100% rename from server/files/var/www/html/index.php rename to core/files/var/www/html/index.php diff --git a/docker-bake.hcl b/docker-bake.hcl index f8e8058..1a7f9d6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -73,7 +73,7 @@ variable "PHP_VER" { group "default" { targets = [ "misp-modules", - "misp", + "misp-core", ] } @@ -89,8 +89,8 @@ target "misp-modules" { platforms = "${PLATFORMS}" } -target "misp" { - context = "server/." +target "misp-core" { + context = "core/." dockerfile = "Dockerfile" tags = flatten(["${NAMESPACE}/misp-core:latest", "${NAMESPACE}/misp-core:${COMMIT_HASH}", MISP_TAG != "" ? ["${NAMESPACE}/misp-core:${MISP_TAG}"] : []]) args = { diff --git a/docker-compose.yml b/docker-compose.yml index e950d88..52b9214 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,10 +28,10 @@ services: cap_add: - SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log - misp: - image: ghcr.io/misp/misp-docker/misp-docker:core-latest + misp-core: + image: ghcr.io/misp/misp-docker/misp-core:latest build: - context: server/. + context: core/. args: - MISP_TAG=${MISP_TAG} - MISP_COMMIT=${MISP_COMMIT} @@ -88,7 +88,7 @@ services: - "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}" misp-modules: - image: ghcr.io/misp/misp-docker/misp-docker:modules-latest + image: ghcr.io/misp/misp-docker/misp-modules:latest build: context: modules/. args: