Peter Butkovic
Peter Butkovic

Reputation: 12179

dash on alpine linux (in docker)

I'm trying to install dash in the (dockerized) alpine linux. My Dockerfile follows:

FROM alpine:latest

RUN \
    echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
    apk add --no-cache --update dash
ENV SHELL dash

CMD dash

the output I get:

Step 1/4 : FROM alpine:latest
 ---> 053cde6e8953
Step 2/4 : RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories &&     apk add --no-cache --update dash
 ---> Running in 680f3d4d7dda
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  dash-0.5.9.1-r0:
    masked in: @community
    satisfies: world[dash]
ERROR: Service 'dash_alpine' failed to build: The command '/bin/sh -c echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories &&     apk add --no-cache --update dash' returned a non-zero code: 1

however based on the alpine linux package search it seems to be available in the community repo: https://pkgs.alpinelinux.org/packages?name=dash&branch=edge&repo=&arch=&maintainer=

What should I change to make it working?

Upvotes: 0

Views: 1610

Answers (1)

stacksonstacks
stacksonstacks

Reputation: 9321

I think your echo line is wrong.
This file works well for me.

FROM alpine:edge
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk add -U --no-cache dash

Upvotes: 1

Related Questions