Why can't I apk add package runit?

4 posts / 0 new
Last post
#1 Thu, 2015-10-22 05:20
gzoller
  • gzoller's picture
  • Offline
  • Last seen: 2 years 5 months ago
  • Joined: 2015-10-22

Hello,

I'm trying to build an Alpine Linux Docker image with runit installed. I see there is a package available at an official-looking repository here:

https://pkgs.alpinelinux.org/packages?name=runit&repo=all&arch=x86_64&maintainer=all

So my Dockerfile looks like:

FROM alpine
 
RUN \
  apk update && \
  apk add python3 && \
  apk add runit --update-cache --repository <a href="https://pkgs.alpinelinux.org/packages" rel="nofollow">https://pkgs.alpinelinux.org/packages</a> --allow-untrusted
 
ADD . /bd_build
RUN cp /bd_build/bin/setuser /sbin/setuser 
 
RUN /bd_build/system_services.sh && \
	/bd_build/cleanup.sh
 
CMD ["/sbin/my_init"]

Sorry... silly editor converts urls into links! I've also just tried simply "apk add runit". In either case I get an error:

Executing busybox-1.23.2-r0.trigger
OK: 55 MiB in 21 packages
fetch <a href="https://pkgs.alpinelinux.org/packages/x86_64/APKINDEX.tar.gz
ERROR:" rel="nofollow">https://pkgs.alpinelinux.org/packages/x86_64/APKINDEX.tar.gz
ERROR:</a> <a href="https://pkgs.alpinelinux.org/packages:" rel="nofollow">https://pkgs.alpinelinux.org/packages:</a> No such file or directory
WARNING: Ignoring APKINDEX.c43f1e81.tar.gz: No such file or directory
fetch <a href="http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR:" rel="nofollow">http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR:</a> unsatisfiable constraints:
  runit (missing):
    required by: world[runit]
The command '/bin/sh -c apk update &&   apk add python3 &&   apk add runit --update-cache --repository <a href="https://pkgs.alpinelinux.org/packages" rel="nofollow">https://pkgs.alpinelinux.org/packages</a> --allow-untrusted' returned a non-zero code: 1
make: *** [build] Error 1

Thu, 2015-10-22 19:15
scorpp
  • scorpp's picture
  • Offline
  • Last seen: 2 years 5 months ago
  • Joined: 2015-10-19

maybe because it's in repo testing?

Wed, 2015-12-23 20:05
maxbeatty
  • maxbeatty's picture
  • Offline
  • Last seen: 2 years 3 months ago
  • Joined: 2015-12-23

I was able to install runit by adding the testing repository and then specifying @testing

RUN echo "@testing \http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk --update add runit@testing

(be sure to remove the slash in front of http. it's to make the example code look nicer (forum doesn't try to escape))

Tue, 2016-08-30 00:54 (Reply to #3)
sandeepadi
  • sandeepadi's picture
  • Offline
  • Last seen: 1 year 7 months ago
  • Joined: 2016-08-30

@maxbeatty I see that this is what is used in the Dockerfile-lb file in jsperf. But I'm getting the error as below

ERROR: unsatisfiable constraints:
  runit (missing):
    required by: world[runit]

Log in or register to post comments