question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dockerfile does not create working container

See original GitHub issue

Browser Type/Version: n/a

Issue Description: Dockerfile does not create working container.

Code to reproduce: Clone the repo, run docker build -t naturalcrit .

Further information Final lines output:

npm WARN homebrewery@2.3.0 No repository field.
npm info ok 
 ---> b15f09ed264f
Removing intermediate container e83050364435
Step 17 : RUN gulp fresh
 ---> Running in 8249b781229a
[20:08:18] Local gulp not found in /opt/apps/naturalcrit
[20:08:18] Try running: npm install gulp

Same thing on both Arch and Ubuntu 14.04, both with Docker 1.12.1.

it appears that npm and gulp installations are no longer persisted between intermediate containers. The following changes allow container creation to complete, but start.sh fails on a docker run:

FROM node:latest

MAINTAINER David Hudson <jendave@yahoo.com>

# System update
RUN apt-get -q -y update && \
    apt-get -q -y install npm mongodb --no-install-recommends && \
    apt-get clean && rm -r /var/lib/apt/lists/*

EXPOSE 22 
EXPOSE 8000

ADD start.sh /start.sh 
RUN chmod +x /start.sh 

VOLUME ["/opt/apps"]
COPY . /opt/apps/naturalcrit/
WORKDIR /opt/apps/naturalcrit/

RUN mkdir -p /opt/apps/naturalcrit/node_modules && \
    npm install && \
    npm install -g gulp && \
    npm install gulp && \
    gulp fresh

CMD ["/start.sh"] 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathonfcommented, Sep 19, 2016

Righty, now #203 is merged I’ve re-created the PR as #206.

1reaction
jonathonfcommented, Sep 19, 2016

Just as reference, I think the issues I have with the current Dockerfile are due to the use of a volume to contain the application code rather than just data. (This is fixed in the PR.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker does not create a new container when using docker ...
I've set up two windows container for ASP.NET and MSSQL server. On the first docker-compose build everything works as expected.
Read more >
docker run not working: no container created despite making ...
docker run doesn't seem to build a container (but it also doesn't throw an error) despite docker build successfully building the container image ......
Read more >
docker build exits successfully but no built image show up in ...
i have successfully run docker build command but image does not show up in the docker images command. ... Describe the results you...
Read more >
Create a Dev Container - Visual Studio Code
Work with a container deployed application defined by an image, Dockerfile, or Docker Compose. Use Docker or Kubernetes from inside a dev container...
Read more >
Build a Container with a Dockerfile - Fedora Docs
If a container does not already exist for your application, one can be built for your device. It is common to create images...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found