I was successful to containerize mkp224o for vanity v3 onion addresses generation and I am successful running the image from docker directly,but inside my OKD cluster the image starts and I get a running pod that is utilizing the CPU but no results are shown in pod logs or written to disk.
docker run --rm mkp224o -d /tmp f # generates results locally and on cluster nodes
if I do oc edit dc and add args:"/onion/mkp224o -d /tmp f" # no results written/shown
#Dockerfile
FROM alpine:3.9
RUN set -ex \
&& cd /tmp \
&& apk add --no-cache tini libsodium pcre2 \
&& apk add --no-cache --virtual .fetch git make autoconf build-base libsodium-dev pcre
2-dev \
&& git clone https://github.com/cathugger/mkp224o.git --depth 1 \
&& cd mkp224o \
&& ./autogen.sh \
&& ./configure --enable-amd64-51-30k --enable-regex \
&& make \
&& mkdir /onion \
&& cp ./mkp224o /onion \
&& apk del .fetch \
&& cd;rm -r /tmp/mkp224o \
&& adduser -g '' -h /onion -u 1000 -D -s /sbin/nologin onion \
&& chown -R onion:onion /onion
USER onion
ENTRYPOINT ["/sbin/tini","--","/onion/mkp224o"]
CMD ["-d /tmp filter"]
I was expecting since it ran from docker and displayed results that it should do the same on the cluster inside the pod.
Openshift runs containers as random unprivileged user with group 0 (root). You don't need to create user in your Dockerfile, because it is pointless in Openshift. Instead you must use this commands:
RUN chgrp -R 0 /onion && chmod -R g=u /onion