mirror of https://github.com/MISP/misp-docker
Make variable names consistent
parent
a861906dcf
commit
fffaa51572
|
@ -86,4 +86,4 @@ New options are added on a regular basis.
|
||||||
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:
|
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:${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: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)
|
- `misp-core:${CORE_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)
|
||||||
|
|
|
@ -3,8 +3,8 @@ ARG DOCKER_HUB_PROXY=""
|
||||||
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build
|
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER 1
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
||||||
ARG MISP_TAG
|
ARG CORE_TAG
|
||||||
ARG MISP_COMMIT
|
ARG CORE_COMMIT
|
||||||
|
|
||||||
RUN apt-get update; apt-get install -y --no-install-recommends \
|
RUN apt-get update; apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
@ -24,7 +24,7 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build
|
||||||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
ADD https://raw.githubusercontent.com/MISP/MISP/${MISP_COMMIT:-${MISP_TAG}}/app/composer.json /tmp
|
ADD https://raw.githubusercontent.com/MISP/MISP/${CORE_COMMIT:-${CORE_TAG}}/app/composer.json /tmp
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
RUN composer config --no-interaction allow-plugins.composer/installers true
|
RUN composer config --no-interaction allow-plugins.composer/installers true
|
||||||
RUN composer install
|
RUN composer install
|
||||||
|
@ -64,8 +64,8 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as php-build
|
||||||
|
|
||||||
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as python-build
|
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as python-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ARG MISP_TAG
|
ARG CORE_TAG
|
||||||
ARG MISP_COMMIT
|
ARG CORE_COMMIT
|
||||||
ARG PYPI_REDIS_VERSION
|
ARG PYPI_REDIS_VERSION
|
||||||
ARG PYPI_LIEF_VERSION
|
ARG PYPI_LIEF_VERSION
|
||||||
ARG PYPI_PYDEEP2_VERSION
|
ARG PYPI_PYDEEP2_VERSION
|
||||||
|
@ -83,10 +83,10 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as python-build
|
||||||
|
|
||||||
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
|
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
if [ ! -z "${MISP_COMMIT}" ]; then
|
if [ ! -z "${CORE_COMMIT}" ]; then
|
||||||
git clone https://github.com/MISP/MISP.git /var/www/MISP && cd /var/www/MISP && git checkout "${MISP_COMMIT}"
|
git clone https://github.com/MISP/MISP.git /var/www/MISP && cd /var/www/MISP && git checkout "${CORE_COMMIT}"
|
||||||
else
|
else
|
||||||
git clone --branch "${MISP_TAG}" --depth 1 https://github.com/MISP/MISP.git /var/www/MISP
|
git clone --branch "${CORE_TAG}" --depth 1 https://github.com/MISP/MISP.git /var/www/MISP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /var/www/MISP || exit; git submodule update --init --recursive .
|
cd /var/www/MISP || exit; git submodule update --init --recursive .
|
||||||
|
@ -135,8 +135,8 @@ EOF
|
||||||
|
|
||||||
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim"
|
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim"
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ARG MISP_TAG
|
ARG CORE_TAG
|
||||||
ARG MISP_COMMIT
|
ARG CORE_COMMIT
|
||||||
ARG PHP_VER
|
ARG PHP_VER
|
||||||
|
|
||||||
RUN apt-get update; apt-get install -y --no-install-recommends \
|
RUN apt-get update; apt-get install -y --no-install-recommends \
|
||||||
|
|
|
@ -58,11 +58,11 @@ variable "LIBFAUP_COMMIT" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "MISP_TAG" {
|
variable "CORE_TAG" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "MISP_COMMIT" {
|
variable "CORE_COMMIT" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,10 +92,10 @@ target "misp-modules" {
|
||||||
target "misp-core" {
|
target "misp-core" {
|
||||||
context = "core/."
|
context = "core/."
|
||||||
dockerfile = "Dockerfile"
|
dockerfile = "Dockerfile"
|
||||||
tags = flatten(["${NAMESPACE}/misp-core:latest", "${NAMESPACE}/misp-core:${COMMIT_HASH}", MISP_TAG != "" ? ["${NAMESPACE}/misp-core:${MISP_TAG}"] : []])
|
tags = flatten(["${NAMESPACE}/misp-core:latest", "${NAMESPACE}/misp-core:${COMMIT_HASH}", CORE_TAG != "" ? ["${NAMESPACE}/misp-core:${CORE_TAG}"] : []])
|
||||||
args = {
|
args = {
|
||||||
"MISP_TAG": "${MISP_TAG}",
|
"CORE_TAG": "${CORE_TAG}",
|
||||||
"MISP_COMMIT": "${MISP_COMMIT}",
|
"CORE_COMMIT": "${CORE_COMMIT}",
|
||||||
"PHP_VER": "${PHP_VER}",
|
"PHP_VER": "${PHP_VER}",
|
||||||
"PYPI_REDIS_VERSION": "${PYPI_REDIS_VERSION}",
|
"PYPI_REDIS_VERSION": "${PYPI_REDIS_VERSION}",
|
||||||
"PYPI_LIEF_VERSION": "${PYPI_LIEF_VERSION}",
|
"PYPI_LIEF_VERSION": "${PYPI_LIEF_VERSION}",
|
||||||
|
|
|
@ -33,8 +33,8 @@ services:
|
||||||
build:
|
build:
|
||||||
context: core/.
|
context: core/.
|
||||||
args:
|
args:
|
||||||
- MISP_TAG=${MISP_TAG}
|
- CORE_TAG=${CORE_TAG}
|
||||||
- MISP_COMMIT=${MISP_COMMIT}
|
- CORE_COMMIT=${CORE_COMMIT}
|
||||||
- PHP_VER=${PHP_VER}
|
- PHP_VER=${PHP_VER}
|
||||||
- PYPI_REDIS_VERSION=${PYPI_REDIS_VERSION}
|
- PYPI_REDIS_VERSION=${PYPI_REDIS_VERSION}
|
||||||
- PYPI_LIEF_VERSION=${PYPI_LIEF_VERSION}
|
- PYPI_LIEF_VERSION=${PYPI_LIEF_VERSION}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Build-time variables
|
# Build-time variables
|
||||||
##
|
##
|
||||||
|
|
||||||
MISP_TAG=v2.4.181
|
CORE_TAG=v2.4.181
|
||||||
MODULES_TAG=v2.4.179
|
MODULES_TAG=v2.4.179
|
||||||
PHP_VER=20190902
|
PHP_VER=20190902
|
||||||
LIBFAUP_COMMIT=3a26d0a
|
LIBFAUP_COMMIT=3a26d0a
|
||||||
|
@ -18,8 +18,8 @@ LIBFAUP_COMMIT=3a26d0a
|
||||||
# PYPI_CYBOX_VERSION="==2.1.*"
|
# PYPI_CYBOX_VERSION="==2.1.*"
|
||||||
# PYPI_PYMISP_VERSION="==2.4.178"
|
# PYPI_PYMISP_VERSION="==2.4.178"
|
||||||
|
|
||||||
# MISP_COMMIT takes precedence over MISP_TAG
|
# CORE_COMMIT takes precedence over CORE_TAG
|
||||||
# MISP_COMMIT=c56d537
|
# CORE_COMMIT=c56d537
|
||||||
# MODULES_COMMIT takes precedence over MODULES_TAG
|
# MODULES_COMMIT takes precedence over MODULES_TAG
|
||||||
# MODULES_COMMIT=de69ae3
|
# MODULES_COMMIT=de69ae3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue