Skip to content

npm install in docker with docker compose socket timeout #1762

Closed
@52cs

Description

@52cs

I encountered the same problem today!
And I have found a work around!
Hoping to make some hint!
We just need a little bit more time to find out the truth problem!

Failed Dockerfile:

FROM node:16-alpine3.15

# Copy the current directory into the Docker image
COPY . /submission-quality-processor 
  
# Set working directory for future use
WORKDIR /submission-quality-processor
  
# Install the dependencies from package.json
RUN npm install

ENTRYPOINT npm start

Successed Dockerfile:

FROM node:16-alpine3.15

RUN set -eux; \
    apk add --no-cache --virtual build-dependencies wget unzip gnupg; \
    apk add --no-cache git python3 py-pip bash shellcheck openjdk11-jre curl musl-locales musl-locales-lang; 

# Copy the current directory into the Docker image
COPY . /submission-quality-processor 
  
# Set working directory for future use
WORKDIR /submission-quality-processor
  
# Install the dependencies from package.json
RUN npm install

ENTRYPOINT npm start

Let's find out the ghost by reducing this part:

RUN set -eux; \
    apk add --no-cache --virtual build-dependencies wget unzip gnupg; \
    apk add --no-cache git python3 py-pip bash shellcheck openjdk11-jre curl musl-locales musl-locales-lang; 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions