RUN echo \'http://dl-cdn.alpinelinux.org/alpine/v3.6/community\' >> /etc/apk/repositories
RUN apk update
RUN apk add mongodb==3.4.4-r0
RUN mongo --version
MongoDB version 3.4.4-r0
is located in Alpine v3.6 community repository and requires another packages like boost
, boost-iostreams
, boost-dev
etc version 1.62.0-r5
to be installed. They are only available in Alpine v3.6 main repository. You just need to add that repository to alpine repository's list as well:
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/main' >> /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN apk update
RUN apk add mongodb=3.4.4-r0
RUN mongo --version