Skip to content

Commit

Permalink
switch to using ubi8 instead?
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Jul 21, 2023
1 parent cb30021 commit 6f59ab2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions cern-phonebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
ARG BASE_IMAGE=python:3
ARG BASE_IMAGE=registry.access.redhat.com/ubi8/python-39
FROM ${BASE_IMAGE} as builder
USER root
WORKDIR /code/

RUN apt-get update && \
apt-get install -y golang && \
RUN dnf clean expire-cache && \
dnf install -y golang && \
go install github.com/msoap/shell2http@latest && \
cp $(go env GOPATH)/bin/shell2http .

FROM ${BASE_IMAGE}
USER root
WORKDIR /app
COPY --from=builder /code/shell2http .

COPY entrypoint.sh /entrypoint.sh
COPY pyphonebook pyphonebook/
COPY lookup.sh .

RUN apt-get update && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
RUN dnf clean expire-cache && \
dnf install -y cronie jq && \
dnf clean all && \
rm -rf /var/cache/dnf && \
python -m venv venv && \
./venv/bin/python -m pip install -U pip && \
./venv/bin/python -m pip install ldap3 && \
Expand Down

0 comments on commit 6f59ab2

Please sign in to comment.