-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/redhat-ubi-dockerfile' into 'develop'
Feature/redhat ubi dockerfile See merge request flagsmith/bullet-train-api!356
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM registry.redhat.io/ubi8/python-38 as application | ||
|
||
MAINTAINER Ben Rometsch <[email protected]> | ||
|
||
LABEL name="flagsmith-api" \ | ||
vendor="Flagsmith" \ | ||
maintainer="[email protected]" \ | ||
version="0.0.1" \ | ||
summary="Feature Flags and Remote Config API" \ | ||
description="Feature Flags and Remote Config API" | ||
COPY License /licenses/License | ||
|
||
USER root | ||
RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical | ||
USER 1001 | ||
|
||
ADD --chown=1001:0 requirements.txt . | ||
RUN pip install -r requirements.txt | ||
ADD --chown=1001:0 docker/bin/ bin/ | ||
ADD --chown=1001:0 src/ src/ | ||
|
||
RUN python src/manage.py collectstatic --no-input | ||
|
||
ARG ACCESS_LOG_LOCATION="/dev/null" | ||
ENV ACCESS_LOG_LOCATION=${ACCESS_LOG_LOCATION} | ||
ENV DJANGO_SETTINGS_MODULE=app.settings.production | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["./bin/docker"] |