Issue installing MongoDB on alpine

前端 未结 4 1006
耶瑟儿~
耶瑟儿~ 2021-01-04 18:58
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
         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 19:24

    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
    

提交回复
热议问题