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.

  • Mounting directory from parent system to container in docker
  • Pushing to a private Docker v2 registry gives an error: Manifest invalid
  • Cron job not auto runs inside a Docker container
  • pm2: how to switch multiple app declaration json inside docker
  • Docker: ENTRYPOINT can't execute command because it doesn't find the file
  • Docker Data Volume Container - Can I share across swarm
  • 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

  • Publishing vNext project to Windows Server 2016 Preview Container
  • Docker Container Best Practices
  • Expose container port to Host using Docker for Windows in Windows 10
  • DNS failover with Docker Swarm 1.12
  • $ bundle install --path /cache Could not locate Gemfile
  • Establishing configurations in new containers
  • 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.