Bcrypt: invalid ELF header with Docker and Sails.JS

后端 未结 7 2000
被撕碎了的回忆
被撕碎了的回忆 2021-01-02 02:41

My Node Dockfile:

# Set the base image to ubuntu
FROM ubuntu

# Define working directory
ADD . /src
WORKDIR /src

# Install Node.js & other          


        
7条回答
  •  别那么骄傲
    2021-01-02 03:11

    The root cause is => Docker Context. Docker context is copying everything from your root folder to destination container working directory.

    So you have to add a .dockerignore file and add these entries (with any other files that you want to ignore)

    • node_modules
    • npm-debug.log

    And now when you will build your container, it will build everything as per container's OS.

提交回复
热议问题