gulp not running on Docker ubuntu

I’m trying to use gulp to start a webpack compiler in a docker environment. Wheneever I try to run the command (in ssh, the Dockerfile, or the Procfile) it fails with error code 1 and prints nothing.

I checked and gulp is installed in node_packages, but when I run it from node_packages/.bin I get the same response. Running “npm” works, but running “node” appears not to work either.

  • Remote Node.js typescript debugging in WebStorm
  • How do you setup a Docker swarm on Raspberry Pis with one external (USB) storage device?
  • about docker link and container's /etc/hosts file
  • Docker installation on Ubuntu 12.04 -> cannot connect to daemon
  • unable to find the /etc/default/docker with latest docker 17.03.0-ce
  • Pulling docker image python:2.7-onbuild taking a long time
  • Does anyone know what is going wrong?


    # Basic dependencies
    RUN apt-install build-essential python-dev python-setuptools
    RUN apt-install libxml2-dev libxslt1-dev python-dev
    # PostgreSQL dev headers and client (uncomment if you use PostgreSQL)
    # RUN apt-install libpq-dev postgresql-client-9.3 postgresql-contrib-9.3
    # MySQL dev headers (uncomment if you use MySQL)
    RUN apt-install libmysqlclient-dev
    RUN easy_install pip
    RUN apt-install node
    RUN apt-install npm
    # Add requirements.txt and package.json ONLY, then run pip install, so that Docker cache won't
    # bust when changes are made to other repo files
    ADD requirements.txt /app/
    ADD package.json /app/
    WORKDIR /app
    RUN pip install -r requirements.txt
    RUN npm install
    # Add repo contents to image
    ADD . /app/
    # RUN npm install -g gulp
    # RUN gulp webpack:dev
    #django environment variables
    # ENV DATABASE_URL xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    # ENV SECRET_KEY xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    # ENV DJANGO_SETTINGS_MODULE xxxxxxxxxxxxx
    ENV PORT 3000
    EXPOSE 3000


    web: sudo node_modules/.bin/gulp webpack:dev && sudo python app/ runserver$PORT

  • Docker as provider for Vagrant
  • Deploying Flask app with Docker on Elastic Beanstalk: resource creation cancelled error
  • Running cron within a docker debian:jessie container
  • X509 parsing error, 'negative serial number' while pulling repository
  • What is the interaction of Docker's CpuShares between containers?
  • django+nginx docker seems did not load static files
  • One Solution collect form web for “gulp not running on Docker ubuntu”

    Change these lines

    RUN apt-install build-essential python-dev python-setuptools
    RUN apt-install node
    RUN apt-install npm

    to these:

    RUN apt-install build-essential curl python-dev python-setuptools
    RUN curl -sL | sudo -E bash -
    RUN apt-get install -y nodejs

    You’ll note we added curl to your tool installation and we’re grabbing the node ppa, then installing it. This is going to give you the more current version of node on that branch. It will also come with npm, you do not need to install that separately.

    Uncomment this line, as you want gulp to be a global install

    # RUN npm install -g gulp

    Correspondingly, in your proc file – use the global gulp

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.