how to transfer ubuntu dockerfile instructions to alpine

5 posts / 0 new
Last post
#1 Sun, 2016-03-13 17:40
kklepper
  • kklepper's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-13

Just from looking at it, I managed to transfer ubuntu dockerfile instructions to alpine in some cases, but the following stops me:

#FROM phusion/baseimage
FROM gliderlabs/alpine
...
RUN apt-get update \
    && apt-get -y install software-properties-common \
    && apt-get update \
    && add-apt-repository -y ppa:builds/sphinxsearch-beta \
    && apt-get update \
    && apt-get -y install sphinxsearch \
...

Where can I find hints towards my goal?

Mon, 2016-03-14 11:40
kklepper
  • kklepper's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-13

I see that the syntax in alpine is much simpler, so probably apk add sphinx should suffice.

There is a package sphinx, maintained by Francesco Colista, but I get

sudo docker build -t kklepper/sphinx:galpine .
Sending build context to Docker daemon 115.7 kB
Step 1 : FROM gliderlabs/alpine
 ---> d4ca4bcb9d96
Step 2 : MAINTAINER kklepper <gmcgmx@googlemail.com>
 ---> Using cache
 ---> 8e4e35ee65bf
Step 3 : COPY indexandsearch.sh /
 ---> Using cache
 ---> dba8cfd3e6ab
Step 4 : COPY lordsearchd.sh /
 ---> Using cache
 ---> 1281dc5da027
Step 5 : COPY searchd.sh /
 ---> Using cache
 ---> 6ab5b8c1bc27
Step 6 : RUN apk    add sphinx
 ---> Running in d56c84a48ab0
WARNING: Ignoring APKINDEX.207234d0.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.231b5af5.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  sphinx (missing):
    required by: world[sphinx]
The command '/bin/sh -c apk    add sphinx' returned a non-zero code: 1

What am I doing wrong?

Mon, 2016-03-14 11:49
kklepper
  • kklepper's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-13

Adding

RUN  echo "http://dl-2.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
     echo "http://dl-3.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
     echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
     echo "http://dl-5.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories

does not help:

Step 7 : RUN apk --update   add sphinx
 ---> Running in 403a83b66e0d
fetch <a href="http://alpine.gliderlabs.com/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://alpine.gliderlabs.com/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://alpine.gliderlabs.com/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://alpine.gliderlabs.com/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-2.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://dl-2.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-4.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://dl-4.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-5.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR:" rel="nofollow">http://dl-5.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR:</a> unsatisfiable constraints:
  sphinx (missing):
    required by: world[sphinx]
The command '/bin/sh -c apk --update   add sphinx' returned a non-zero code: 1

Mon, 2016-03-14 11:55
kklepper
  • kklepper's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-13

Looking at http://dl-2.alpinelinux.org/alpine/edge/community/x86_64/ I see that there is no sphinx indeed. What now?

Mon, 2016-03-14 12:52
kklepper
  • kklepper's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-13

I filed a bug report

Log in or register to post comments