-4

Kali Linux ベース イメージに基づいて Docker イメージを作成しようとしています。アプリケーションの依存関係として NodeJS をインストールする必要があります。

これが私のDockerfileです:

FROM kalilinux/kali-linux-docker

RUN apt-get update -y && \
    apt-get dist-upgrade -y && \
    apt-get autoremove -y && \
    apt-get clean -y

RUN apt-get install curl -y

RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - \
    && apt-get install nodejs -y

RUN npm i -g npm

ENV NODE_ENV production

WORKDIR /root/app
COPY . .

RUN npm i

EXPOSE 4000
ENTRYPOINT ["npm", "start"]

ただし、NodeJS をインストールしようとすると、次のエラーが発生しました。

Step 4/11 : RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y
 ---> Running in a63e56802eba

## Installing the NodeSource Node.js 8.x LTS Carbon repo...


## Inspecting system...


## You don't appear to be running an Enterprise Linux based system,
please contact NodeSource at https://github.com/nodesource/distributions/issues
if you think this is incorrect or would like your distribution to be considered
for support.

The command '/bin/sh -c curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y' returned a non-zero code: 1

確かに、私はいくつかのことに混乱しています...つまり、NodeJSがすでにKali Linuxにインストールされているという印象を受けました(Debian 64ビットを使用するVirtualBox VMが存在する場合)。メタパッケージまでインストールしようとしましたkali-linux-allが、NodeJS/npm が存在しないようです。

Dockerおよび/またはKali Linuxの基本的な前提を誤解しているだけですか? NodeJS をコンテナーにインストールする他の方法はありますか?

4

1 に答える 1