Skip to content

Commit 4422f7d

Browse files
tparrott-csebutterslaxEthanljf
authored
Cleaned up Dockerfiles (canada-ca#1181)
* Cleaned up Dockerfiles * Removal of unnecessary requirements Co-authored-by: tparrott-cse <tparrott@gmail.com> Co-authored-by: Ethan Foss <fossliam@outlook.com>
1 parent f461e87 commit 4422f7d

8 files changed

Lines changed: 57 additions & 32 deletions

File tree

services/auto-scan/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ ENV HOME /autoscan
55
WORKDIR $HOME
66
COPY . ./
77

8-
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends apt-utils && \
10-
apt-get install -y --no-install-recommends python3 python3-pip && \
11-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
12-
apt-get install -y --no-install-recommends build-essential python3-dev
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
apt-utils \
10+
python3 \
11+
python3-pip \
12+
python3-setuptools \
13+
python3-wheel \
14+
build-essential \
15+
python3-dev
1316

1417
# Install dependencies.
1518
RUN pip3 install -r requirements.txt

services/db-migration/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
FROM alpine
22

33
RUN apk update && apk add --no-cache \
4-
python3-dev py3-pip gcc musl-dev postgresql-dev postgresql-contrib bash
4+
python3-dev \
5+
py3-pip \
6+
gcc \
7+
musl-dev \
8+
postgresql-dev \
9+
postgresql-contrib \
10+
bash
511

612
COPY . /app
713

services/result-queue/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ COPY . ./
77

88
RUN chmod +x docker-entrypoint.sh && touch redis-server.log
99

10-
RUN apt-get update
11-
RUN apt-get install -y --no-install-recommends apt-utils && \
12-
apt-get install -y --no-install-recommends python3 python3-pip && \
13-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
14-
apt-get install -y --no-install-recommends build-essential python3-dev redis-server systemd
10+
RUN apt-get update && apt-get install -y --no-install-recommends \
11+
apt-utils \
12+
python3 \
13+
python3-pip \
14+
python3-setuptools \
15+
python3-wheel \
16+
python3-dev \
17+
redis-server \
18+
systemd
1519

1620
RUN pip3 install -r requirements.txt
1721
RUN sed -i 's/\/var\/log\/redis\/redis-server\.log/\"\"/g' /etc/redis/redis.conf

services/scan-queue/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ redis
66
rq
77
flask
88
pretend
9-
psycopg2-binary

services/scanners/dns/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ ENV SCANNER_HOME /dns
55
WORKDIR $SCANNER_HOME
66
COPY . ./
77

8-
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends apt-utils && \
10-
apt-get install -y --no-install-recommends python3 python3-pip && \
11-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
12-
apt-get install -y --no-install-recommends build-essential python3-dev
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
apt-utils \
10+
python3 \
11+
python3-pip \
12+
python3-setuptools \
13+
python3-wheel \
14+
build-essential \
15+
python3-dev
1316

1417
RUN pip3 install -r requirements.txt
1518

services/scanners/https/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ ENV SCANNER_HOME /https
55
WORKDIR $SCANNER_HOME
66
COPY . ./
77

8-
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends apt-utils && \
10-
apt-get install -y --no-install-recommends python3 python3-pip && \
11-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
12-
apt-get install -y --no-install-recommends build-essential python3-dev
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
apt-utils \
10+
python3 \
11+
python3-pip \
12+
python3-setuptools \
13+
python3-wheel \
14+
build-essential \
15+
python3-dev
1316

1417
RUN pip3 install -r requirements.txt
1518

services/scanners/results/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ ENV HOME /results
55
WORKDIR $HOME
66
COPY . ./
77

8-
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends apt-utils && \
10-
apt-get install -y --no-install-recommends python3 python3-pip && \
11-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
12-
apt-get install -y --no-install-recommends build-essential python3-dev libpq-dev
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
apt-utils \
10+
python3 \
11+
python3-pip \
12+
python3-setuptools \
13+
python3-wheel \
14+
build-essential \
15+
python3-dev \
16+
libpq-dev
1317

1418
# Install dependencies.
1519
RUN pip3 install -r requirements.txt

services/scanners/ssl/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ ENV SCANNER_HOME /ssl
55
WORKDIR $SCANNER_HOME
66
COPY . ./
77

8-
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends apt-utils && \
10-
apt-get install -y --no-install-recommends python3 python3-pip && \
11-
apt-get install -y --no-install-recommends python3-setuptools python3-wheel && \
12-
apt-get install -y --no-install-recommends build-essential python3-dev
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
apt-utils \
10+
python3 \
11+
python3-pip \
12+
python3-setuptools \
13+
python3-wheel \
14+
build-essential \
15+
python3-dev
1316

1417
RUN pip3 install -r requirements.txt
1518

0 commit comments

Comments
 (0)