5

I'm trying to install packages in a docker image based on alpine. The host system is CentOS system, system-release: CentOS Linux release 7.6.1810 (Core).

Here's what I do:

# docker run -td alpine:3.9
abbd2da62ed51047de063ef06e2422ae22ff77788fd70a626ad3a6b85856a3af.
# docker exec -it abbd2
/ # apk add bash
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl- 
cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(2/5) Installing ncurses-terminfo (6.1_p20190105-r0)
(3/5) Installing ncurses-libs (6.1_p20190105-r0)
(4/5) Installing readline (7.0.003-r1)
ERROR: readline-7.0.003-r1: Permission denied
(5/5) Installing bash (4.4.19-r1)
ERROR: bash-4.4.19-r1: Permission denied
2 errors; 13 MiB in 17 packages

This corresponds to a Dockerfile like this:

FROM alpine:3.9
RUN apk add bash

Why do I get permission errors while trying to install the package (using bash here as an example)?

How can I get the package to install?

3
  • I just did a docker build from your Dockerfile, it was successful. What happens when you docker build it? Commented Mar 22, 2019 at 10:17
  • The permission errors (as shown in the first code block) appear.
    – Wilbert
    Commented Mar 22, 2019 at 10:48
  • 1
    I removed docker from title, as I don't think it is relevant. Can you accept your answer by clicking the tick ✓. Commented Mar 22, 2019 at 19:45

1 Answer 1

5

Blocked by Proxy

Turns out the problem was that our Proxy did not allow downloads from dl-cdn.alpinelinux.org.

The error message that alpine gives could be clearer, but anyway: Allowing downloads from that URL made the apk add run through without problems.

1
  • i do agree! same here Commented Sep 11, 2023 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .