Docker-alpine: rc-update missing in alpine:>=3.3

Created on 9 Sep 2016  路  4Comments  路  Source: gliderlabs/docker-alpine

Hi,

I created the following Dockerfile:

FROM alpine:3.3

RUN apk update \
    && apk upgrade \
    && apk add bash curl openvpn iptables \
    && rm -rf /var/cache/apk/* \
    && rc-update add openvpn default \
    && echo "tun" >> /etc/modules

but starting from alpine:3.3 it fails because rc-update cannot be found:

docker build -f Dockerfile .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM alpine:3.3
 ---> 47cf20d8c26c
Step 2 : RUN apk update         && apk upgrade  && apk add bash curl openvpn iptables   && rm -rf /var/cache/apk/*      && rc-update add openvpn default        && echo "tun" >> /etc/modules
 ---> Running in e77dd3e29e05
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
v3.3.3-124-gb4ea58d [http://dl-cdn.alpinelinux.org/alpine/v3.3/main]
v3.3.3-74-g713311c [http://dl-cdn.alpinelinux.org/alpine/v3.3/community]
OK: 5858 distinct packages available
(1/2) Upgrading libcrypto1.0 (1.0.2h-r1 -> 1.0.2h-r2)
(2/2) Upgrading libssl1.0 (1.0.2h-r1 -> 1.0.2h-r2)
OK: 5 MiB in 11 packages
(1/13) Installing ncurses-terminfo-base (6.0-r6)
(2/13) Installing ncurses-terminfo (6.0-r6)
(3/13) Installing ncurses-libs (6.0-r6)
(4/13) Installing readline (6.3.008-r4)
(5/13) Installing bash (4.3.42-r3)
Executing bash-4.3.42-r3.post-install
(6/13) Installing openssl (1.0.2h-r2)
(7/13) Installing ca-certificates (20160104-r2)
(8/13) Installing libssh2 (1.6.0-r1)
(9/13) Installing curl (7.49.1-r1)
(10/13) Installing iptables (1.4.21-r4)
(11/13) Installing iproute2 (4.2.0-r0)
Executing iproute2-4.2.0-r0.post-install
(12/13) Installing lzo (2.09-r0)
(13/13) Installing openvpn (2.3.8-r2)
Executing openvpn-2.3.8-r2.pre-install
Executing busybox-1.24.2-r0.trigger
Executing ca-certificates-20160104-r2.trigger
OK: 18 MiB in 24 packages
/bin/sh: rc-update: not found

Most helpful comment

The rc-update command is part of the openrc package so you should install this, too. Also note that you may want to use the --no-cache parameter of apk.

If you don't know https://github.com/just-containers/s6-overlay, it might be worth to have a look at it as a replacement for openrc.

All 4 comments

The rc-update command is part of the openrc package so you should install this, too. Also note that you may want to use the --no-cache parameter of apk.

If you don't know https://github.com/just-containers/s6-overlay, it might be worth to have a look at it as a replacement for openrc.

Cool, thx for the quick response, I'll have a look at it today.

The rc-update command is part of the openrc package so you should install this, too. Also note that you may want to use the --no-cache parameter of apk.

If you don't know https://github.com/just-containers/s6-overlay, it might be worth to have a look at it as a replacement for openrc.

Thanks for saving time. It worked like a charm after installing $ apk add openrc

Thanks, I had the same issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kalaksi picture kalaksi  路  3Comments

kooksee picture kooksee  路  4Comments

crsrivats picture crsrivats  路  5Comments

ncopa picture ncopa  路  4Comments

mterzo picture mterzo  路  4Comments