ubi9 base image with ksh93 instead of bash and including oc client
Olaf Bohlen
2022-12-29 af23e6adac7722f72fcdfe2734b8d8aca8ec8859
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# a base image using ksh93 on a ubi9 base including openshift oc
FROM ubi9
LABEL author="Olaf Bohlen <olbohlen@eenfach.de>"
 
# copy included oc client and ksh93
COPY bin/ /usr/bin/
 
RUN chmod 755 /usr/bin/oc /usr/bin/ksh && \
    ln /usr/bin/oc /usr/bin/kubectl && \
    usermod -s /usr/bin/ksh root && \
    printf "PS1=\"(!) $(uname -n):\$PWD# \"\n" >/root/.kshrc && \
    printf "set -o vi\nEDITOR=vi\nexport EDITOR\n" >>/root/.kshrc
 
# we want ksh
ENTRYPOINT ["/usr/bin/ksh", "-c"]
CMD ["/usr/bin/ksh"]