Dockerfile 561 Bytes
Newer Older
Terion's avatar
Terion committed
1
FROM terion/static-web-build-runtime
Terion's avatar
.  
Terion committed
2 3

## prepare
Terion's avatar
Terion committed
4
ADD ./ /usr/share/nginx/
Terion's avatar
.  
Terion committed
5 6
WORKDIR /usr/share/nginx/
RUN chown -R u_web .
Terion's avatar
.  
Terion committed
7

Terion's avatar
fix  
Terion committed
8
# both variants, 'RUN su u_web && cmd' and  'USER u_web \ RUN cmd' seem to work with sudo permissions
Terion's avatar
.  
Terion committed
9
# this is annoying but no way to change
Terion's avatar
.  
Terion committed
10 11 12
# using USER u_web invokes sudo -u and triggers server to show lecture that breaks all process

## build
Terion's avatar
.  
Terion committed
13 14 15 16
RUN su u_web && bundle install
RUN su u_web && npm install
RUN su u_web && ./node_modules/bower/bin/bower install --allow-root
RUN su u_web && node ./node_modules/gulp/bin/gulp.js --production