Skip to content

Commit

Permalink
Removing api user from image (#46)
Browse files Browse the repository at this point in the history
Updating python broken requirement

Signed-off-by: Vicente Zepeda Mas <[email protected]>
  • Loading branch information
chentex authored Oct 11, 2021
1 parent b97ff0f commit 28eb706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@ FROM registry.access.redhat.com/ubi8:latest
COPY image_resources/centos8-appstream.repo /etc/yum.repos.d/centos8-appstream.repo
RUN dnf install -y --nodocs python3 python3-pip && dnf clean all && \
dnf install -y --nodocs skopeo redis curl --enablerepo=centos8-appstream && dnf clean all && \
ln -s /usr/bin/python3 /usr/bin/python && \
useradd -mUs /bin/bash api
WORKDIR /home/api/workdir
ln -s /usr/bin/python3 /usr/bin/python
WORKDIR /workdir

RUN curl -L -o ocm-load-test-linux.tgz \
https://github.com/cloud-bulldozer/ocm-api-load/releases/download/$(curl -L -s -H \
'Accept: application/json' https://github.com/cloud-bulldozer/ocm-api-load/releases/latest \
| sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')/ocm-load-test-linux.tgz && \
tar -xf ocm-load-test-linux.tgz && \
chown -R api:api /home/api/workdir && \
cp ocm-load-test /usr/local/bin/ && \
chmod 755 /usr/local/bin/ocm-load-test

COPY config.example.yaml /home/api/workdir/config.yaml
USER api
ENV PATH="/home/api/.local/bin:${PATH}"
RUN pip3 install --user -r requirements.txt
COPY config.example.yaml /workdir/config.yaml
RUN pip3 install -r requirements.txt

CMD [ "ocm-load-test", "--config-file", "config.yaml" ]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plotly
pandas
docx
python-docx
sqlalchemy
elasticsearch

0 comments on commit 28eb706

Please sign in to comment.