How to use rubbish gulpjs

One programmer decided that it would be easier to minify the project with gulpjs. But as always, it turned out to be more difficult. Because this garbage "gulpjs" doesn't work if installed globally. That's why I made this crutch.

First of all I made the script to solve this problem:


USERID=$(stat -c '%u' .)

cp -r /root/node_modules . && chown ${USERID}:${USERID} -R ./node_modules
# vim: set filetype=bash et sw=2 ts=2:

And packed it into docker

Dockerfile to solve this problem:

FROM node:alpine

  org.label-schema.docker.cmd="docker run " \
  org.label-schema.description="html css ja" \"node" \
  org.label-schema.schema-version=20201120 \
  org.label-schema.vcs-url="" \
  org.label-schema.vendor="devops-team" \


run set -x \
  && npm -g install gulp-cli \
    gulp \
  && cd /root \
  && npm --save-dev install gulp-cli \
    vinyl-sourcemaps-apply \
    gulp-javascript-obfuscator \
    gulp-minify \
    gulp-concat \
    gulp-htmlmin \
    gulp-minify-inline \

CMD ["/"]
# vim: set filetype=dockerfile et sw=2 ts=2: