generate.pl: set an always-accessible WORKDIR for any user

Ensure Perl containers can run even when the working `USER` is altered
by using `WORKDIR /`, as non-root users are unable to access `/root`.
This is especially noticeable in Kubernetes clusters (where container
processes are prevented from running as root.)

Fixes #72.
This commit is contained in:
Zak B. Elep 2019-11-23 10:37:21 +08:00
parent bad811d7db
commit b163317e64

View file

@ -299,6 +299,6 @@ RUN {{docker_slim_run_install}} \
&& {{docker_slim_run_purge}} \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/{{cpanm_dist_name}}* /tmp/*
WORKDIR /root
WORKDIR /
CMD ["perl{{version}}","-de0"]