Skip to content

Commit

Permalink
DRAFT update dockerfiles for hadolint standards
Browse files Browse the repository at this point in the history
  • Loading branch information
mshriver committed May 31, 2024
1 parent 2d1eeea commit 5026462
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
8 changes: 5 additions & 3 deletions backend/Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM registry.access.redhat.com/ubi8/python-38 as base
FROM registry.access.redhat.com/ubi8/python-38:latest1 as base

USER 0
RUN mkdir /ibutsu_venv
RUN chown -R 1001:0 /ibutsu_venv /srv
RUN mkdir -p /ibutsu_venv && \
chown -R 1001:0 /ibutsu_venv /srv

USER 1001
WORKDIR /srv
RUN python -m venv /ibutsu_venv && \
Expand Down
11 changes: 7 additions & 4 deletions backend/docker/Dockerfile.backend
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal
# hadolint global ignore=DL3014,DL3041
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10

WORKDIR /app

USER 0

RUN microdnf install --nodocs -y --disableplugin=subscription-manager gcc libpq-devel python39 python39-devel
COPY . /app
RUN pip3 install --no-cache-dir gunicorn && pip3 install --no-cache-dir -r requirements.txt
RUN chgrp -R 0 ibutsu_server && chmod -R g+rwX ibutsu_server
RUN microdnf install --nodocs -y --disableplugin=subscription-manager gcc libpq-devel python39 python39-devel && \
microdnf clean all && \
pip3 install --no-cache-dir gunicorn && \
pip3 install --no-cache-dir -r requirements.txt && \
chgrp -R 0 ibutsu_server && chmod -R g+rwX ibutsu_server

USER 1001

Expand Down
3 changes: 2 additions & 1 deletion backend/docker/Dockerfile.flower
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM registry.access.redhat.com/ubi8/python-38
# hadolint global ignore=DL3014,DL3041
FROM registry.access.redhat.com/ubi8/python-38:latest

# add application sources with correct perms for OCP
USER 0
Expand Down
3 changes: 2 additions & 1 deletion backend/docker/Dockerfile.fuzz_testing
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.9
# hadolint global ignore=DL3014,DL3041
FROM registry.access.redhat.com/ubi8/python-39

RUN apt-get update && \
apt-get install -y jq && \
Expand Down
1 change: 1 addition & 0 deletions backend/docker/Dockerfile.scheduler
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# hadolint global ignore=DL3014,DL3041
FROM registry.access.redhat.com/ubi8/ubi-minimal

WORKDIR /app
Expand Down
1 change: 1 addition & 0 deletions backend/docker/Dockerfile.worker
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# hadolint global ignore=DL3014,DL3041
FROM registry.access.redhat.com/ubi8/ubi-minimal

WORKDIR /app
Expand Down

0 comments on commit 5026462

Please sign in to comment.