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.

  • Configuring MongoDB replica set from docker-compose
  • Unable to use variables in the Docker Entrypoint command
  • Rebuilding docker image is failing although using the same Dockerfile as shown in the hub
  • managing multiple swarm clusters
  • How does docker compare to openshift?
  • How to solve Docker permission error when trigger by Jenkins
  • 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 Network Namespace
  • Cannot get postgresql-9.3-postgis-2.1 on Ubuntu 14.04.1 Docker container
  • Correct way to start docker daemon listening to specific port
  • Access running docker container filesystem
  • Docker Windows bridge ip conflict
  • .Net Core with Docker on EC2 tutorial problems
  • 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.