Docker: Using apt-key with alpine image

限于喜欢 提交于 2020-01-06 04:56:06

问题


I'm trying to use alpine (nodeJS) docker image, but I do get the error /bin/sh: apt-key: not found. What do I have to add?

FROM node:8.6-alpine
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

回答1:


You could use something as follows:

apk add --no-cache gnupg

gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0C49F3730359A14518585931BC711F9BA15703C6



回答2:


There’s no apt-key on Alpine, this is something from Debian.



来源:https://stackoverflow.com/questions/46515863/docker-using-apt-key-with-alpine-image

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!