Docker Community Forums

Share and learn in the Docker community.

Timeout error when running images built with dependencies

build

(Libzz13) #1

My goal is to create a container where I can:

  1. Input data
  2. Process the data on an executable (.exe) file
  3. Output processed data

I want to use NodeJS to handle the input/output using REST.
So, I would need to install NodeJS on the container along with the dependencies of the executable files.

My Dockerfile now looks like this:

FROM microsoft/windowsservercore

COPY installers installers
COPY sources sources
COPY ProjectXYZ ProjectXYZ

# Install NodeJS and dependencies
RUN cd C:\installers && \
    msiexec.exe /qn /i "node-v8.11.3-x64.msi" && \
    Jet40SP8_9xNT.exe /Q && \
    setup.exe /configure configuration.xml && \
    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:C:\sources\sxs && \
    DISM /Online /Enable-Feature /FeatureName:NetFx4 /All /LimitAccess && \
    cd C:\ && \
    rmdir /s /q sources && \
    rmdir /s /q installers

# Start the service 
ENTRYPOINT "cd C:/ProjectXYZ && node server.js"

This Dockerfile, although takes a long time due to some downloads, builds successfully.

PS C:\projectxyz> docker build -t projectxyz .
Sending build context to Docker daemon  207.1MB
Step 1/6 : FROM microsoft/windowsservercore
 ---> 7d89a4baf66c
Step 2/6 : COPY installers installers
 ---> Using cache
 ---> 1538d7a0ba9d
Step 3/6 : COPY sources sources
 ---> Using cache
 ---> 659167fb1238
Step 4/6 : COPY HiperPlantNodeJS HiperPlantNodeJS
 ---> Using cache
 ---> e8295924e730
Step 5/6 : RUN cd C:\installers &&     Jet40SP8_9xNT.exe /Q &&     msiexec.exe /qn /i "node-v8.11.3-x64.msi" &&     setup.exe /configure configuration.xml &&     DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:C:\sources\sxs &&     DISM /Online /Enable-Feature /FeatureName:NetFx4 /All /LimitAccess &&     cd C:\ &&     rmdir /s /q sources &&     rmdir /s /q installers
 ---> Using cache
 ---> 1ebbf13b0d3c
Step 6/6 : ENTRYPOINT "cd C:/HiperPlantNodeJS && node server.js"
 ---> Running in c8a8af429021
Removing intermediate container c8a8af429021
 ---> c042e6756ef4
Successfully built c042e6756ef4
Successfully tagged projectxyz:latest
PS C:\projectxyz>

However, timeout error always occur when running the built image.

PS C:\projectxyz> docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE
projectxyz                    latest              1519b739fc1d        7 minutes ago       14.4GB
microsoft/windowsservercore   latest              7d89a4baf66c        5 weeks ago         10.7GB
PS C:\projectxyz> docker run --name=xyz01 -p 8765:4321 -d hpnodejs-cmd
74b8a68f25dac38fa715611d597c017b63ba1376974f63f91e10c645df5b2e0e
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 74b8a68f25dac38fa715611d597c017b63ba1376974f63f91e10c645df5b2e0e encountered an error during Start: failure in a Windows system call: This operation returned because the timeout period expired. (0x5b4)

But if I run an image interactively (without the dependencies) and manually install the dependencies in the container, everything works just fine. The container and the project runs as expected.

The system I’m trying to make would need to create multiple copies of this container and run each of it in detached mode. So manually installing the dependencies for each container is already out of the question.

MAIN QUESTION: What do I do to successfully run this image?

Is there a limitation in running large images?
Because as you can see, after installing the dependencies, the image is now 14.5GB.
I could not find any mention of it in the documentation.

Gratitude for your help…