Skip to content

Commit

Permalink
Merge pull request #6 from malwarefrank/env-for-version
Browse files Browse the repository at this point in the history
Easier version-only changes
  • Loading branch information
danielplohmann authored Apr 8, 2024
2 parents 897ad51 + b30566f commit 7ca0d0d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MONGO_TAG=5.0
MCRIT_TAG=1.3.13
MCRIT_BRANCH=v1.3.13
MCRITWEB_TAG=1.3.3
MCRITWEB_BRANCH=v1.3.3
23 changes: 19 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.3'

services:
mongodb:
image: mongo:5.0
image: mongo:${MONGO_TAG}
container_name: mongodb
# restart: always
volumes:
Expand All @@ -11,7 +11,12 @@ services:
ports:
- 127.0.0.1:27017-27019:27017-27019
mcrit-server:
build: ./docker/mcrit/
image: mcrit-server:${MCRIT_TAG}
build:
context: ./docker/mcrit/
args:
MCRIT_TAG: "${MCRIT_TAG}"
MCRIT_BRANCH: "${MCRIT_BRANCH}"
container_name: mcrit-server
depends_on:
- mongodb
Expand All @@ -22,7 +27,12 @@ services:
ports:
- 127.0.0.1:8000:8000
mcrit-worker:
build: ./docker/mcrit/
image: mcrit-worker:${MCRIT_TAG}
build:
context: ./docker/mcrit/
args:
MCRIT_TAG: "${MCRIT_TAG}"
MCRIT_BRANCH: "${MCRIT_BRANCH}"
container_name: mcrit-worker
depends_on:
- mongodb
Expand All @@ -31,7 +41,12 @@ services:
entrypoint:
- /entry_worker.sh
mcritweb:
build: ./docker/mcritweb/
image: mcritweb:${MCRITWEB_TAG}
build:
context: ./docker/mcritweb/
args:
MCRITWEB_BRANCH: "${MCRITWEB_BRANCH}"
MCRIT_TAG: "${MCRIT_TAG}"
container_name: mcritweb
depends_on:
- mcrit-server
Expand Down
3 changes: 2 additions & 1 deletion docker/mcrit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04
ARG MCRIT_BRANCH

RUN apt-get -y update && apt-get -y install locales locales-all
ENV LANG en_US.UTF-8
Expand All @@ -25,7 +26,7 @@ RUN mkdir -p /root/.local/lib/python3.8/site-packages/
RUN ln -s /usr/bin/python3.8 /usr/bin/python

# install mcrit
RUN git clone -b 'v1.3.13' --single-branch https://github.com/danielplohmann/mcrit.git /opt/mcrit
RUN git clone -b "${MCRIT_BRANCH}" --single-branch https://github.com/danielplohmann/mcrit.git /opt/mcrit
RUN python -m pip install -r /opt/mcrit/requirements.txt
RUN python -m pip install -e /opt/mcrit

Expand Down
6 changes: 4 additions & 2 deletions docker/mcritweb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ubuntu:20.04
ARG MCRITWEB_BRANCH
ARG MCRIT_TAG

RUN apt-get -y update && apt-get -y install locales locales-all
ENV LANG en_US.UTF-8
Expand All @@ -25,8 +27,8 @@ RUN mkdir -p /root/.local/lib/python3.8/site-packages/
RUN ln -s /usr/bin/python3.8 /usr/bin/python

# install specific mcritweb+mcrit versions for this release
RUN git clone -b 'v1.3.3' --single-branch https://github.com/fkie-cad/mcritweb.git /opt/mcritweb
RUN python -m pip install mcrit==1.3.13
RUN git clone -b "${MCRITWEB_BRANCH}" --single-branch https://github.com/fkie-cad/mcritweb.git /opt/mcritweb
RUN python -m pip install mcrit==${MCRIT_TAG}
# install remaining requirements
RUN python -m pip install -r /opt/mcritweb/requirements.txt

Expand Down

0 comments on commit 7ca0d0d

Please sign in to comment.