fix: remove cpanm cache (#5385)

Pulling v6.3.0 is failing when using docker with user uid remapping:
```
failed to register layer: Container ID 197609 cannot be mapped to a host ID
```

Trying to pull with rootless podman show a more useful:

```
Error: copying system image from manifest list: writing blob: adding layer with
blob "sha256:98088679e87a1114d3dafa114c911c1d8e5d33fffe624cfdd43b589a136a5f0f":
ApplyLayer stdout:  stderr: potentially insufficient UIDs or GIDs available in
user namespace (requested 197609:197609 for /root/.cpanm/work/1708379740.11/PPI-1.277):
Check /etc/subuid and /etc/subgid if configured locally and run podman-system-migrate:
lchown /root/.cpanm/work/1708379740.11/PPI-1.277: invalid argument exit status 1
```

The `/root/.cpanm` is just a build cache and can be safely removed.
This commit is contained in:
Ioan Rogers 2024-03-22 06:41:18 -07:00 committed by GitHub
parent 3ec9980fe4
commit b00466d6b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -202,6 +202,7 @@ RUN apk add --no-cache --virtual .perl-build-deps \
Perl::Critic::StricterSubs \ Perl::Critic::StricterSubs \
Perl::Critic::Swift \ Perl::Critic::Swift \
Perl::Critic::Tics \ Perl::Critic::Tics \
&& rm -rf /root/.cpanm \
&& apk del --no-network --purge .perl-build-deps && apk del --no-network --purge .perl-build-deps
################# #################