HUB
Sign inSign up
docker-asset-builder logo

zolweb/docker-asset-builder

By zolweb

•Updated almost 9 years ago

Builder for npm, bower, gulp

Image
0

1.2K

zolweb/docker-asset-builder repository overview

⁠Asset builder

This repository contains Dockerfile(s) to have a docker image to build assets with gulp, npm, bower, yarn ...

See docker hub image zolweb/asset-builder⁠

See https://nodejs.org/en/download/⁠ to check npm version coming with node

VersionDockerNPMBowerGulp
1.0node:8.9.3-slim (latest LTS)5.5.11.8.23.9.1
⁠How to use it :
# NPM install
docker run --rm --tty \
    --volume $(PWD):/data \
    zolweb/asset-builder:1.0 \
    bash -ci "npm install"
    
# Bower install
docker run --rm --tty \
    --volume $(PWD):/data \
    zolweb/asset-builder:1.0 \
    bash -ci "bower install"
    
# Gulp usage
docker run --rm --tty \
    --volume $(PWD):/data \
    zolweb/asset-builder:1.0 \
    bash -ci "gulp"

There is a known issue (for example encountered here⁠) with user binding for node default user created Image assume the node user with uid 1000 is obviously the same as host To prevent this, we have to start the container as root then change node user uid to be the same as host (each time the container is started :/)

# Assuming 1001 is your host UID and 1001 your host GID
# Replace "npm install" by whatever command you want to run
docker run --rm --tty \
    --volume $(PWD):/data \
    zolweb/asset-builder:1.0 \
    bash -ci "usermod -u 1001 node && groupmod -g 1001 node && sudo -i -u node && cd /data && npm install"

This image extends from node docker image⁠, you can refer to it for more informations

Tag summary
Recent tags
Content type
Image
Digest
Size
224.4 MB
Last updated
almost 9 years ago
docker pull zolweb/docker-asset-builder:latest