Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions Dockerfile-tools
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
FROM python:3.6-alpine
# Use base UBI image
FROM registry.access.redhat.com/ubi8/ubi

WORKDIR /app

COPY requirements.txt /tmp/requirements.txt
RUN apk --update add python py-pip openssl ca-certificates py-openssl wget bash linux-headers
RUN apk --update add --virtual build-dependencies libffi-dev openssl-dev python-dev py-pip build-base \
&& pip install --upgrade pip \
&& pip install --upgrade -r /tmp/requirements.txt \
&& apk del build-dependencies

# Install python3
RUN yum -y install --disableplugin=subscription-manager python36 \
&& yum --disableplugin=subscription-manager clean all

RUN yum -y install --disableplugin=subscription-manager python3-pip wget \
&& yum --disableplugin=subscription-manager clean all

RUN pip3 install --upgrade -r /tmp/requirements.txt

# Update python command to point to python3 install
RUN alternatives --set python /usr/bin/python3

ENV FLASK_APP=server/__init__.py
ENV FLASK_DEBUG=true

COPY . /app
COPY run-dev /bin
RUN chmod 777 /bin/run-dev


ARG bx_dev_user=root
ARG bx_dev_userid=1000

RUN BX_DEV_USER=$bx_dev_user
RUN BX_DEV_USERID=$bx_dev_userid
RUN if [ "$bx_dev_user" != root ]; then adduser -D -s /bin/bash -u $bx_dev_userid $bx_dev_user; fi
RUN if [ "$bx_dev_user" != root ]; then useradd -ms /bin/bash -u $bx_dev_userid $bx_dev_user; fi