Docker: Using apt-key with alpine image

前端 未结 3 912
心在旅途
心在旅途 2021-01-22 13:43

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         


        
相关标签:
3条回答
  • 2021-01-22 14:01

    Take a look on my sample Dockerfile.

    FROM openjdk:8-alpine
    RUN apk update \
        && apk fetch gnupg \
        && apk add gnupg \
        && gpg --list-keys
    
    0 讨论(0)
  • 2021-01-22 14:12

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

    0 讨论(0)
  • 2021-01-22 14:21

    You could use something as follows:

    apk add --no-cache gnupg
    
    gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0C49F3730359A14518585931BC711F9BA15703C6
    
    0 讨论(0)
提交回复
热议问题