Last active
January 8, 2016 10:11
-
-
Save elvanja/4a903a73f23d326c0177 to your computer and use it in GitHub Desktop.
Docker images to help recreate https://github.com/npm/npm/pull/10582 situation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ===================================== | |
# CentOS version | |
# ===================================== | |
FROM centos | |
RUN yum install -y \ | |
gcc-c++ \ | |
make \ | |
vim | |
RUN curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - \ | |
&& yum -y install nodejs \ | |
&& npm install -g npm | |
RUN sed -i "55i console.log('===============================')" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "56i console.log('wd:', wd)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "57i console.log('npm.dir:', npm.dir)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "58i console.log('stage:', stage)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "59i console.log('pkg.name:', pkg.name)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "60i console.log('pkg.scripts[stage]:', pkg.scripts[stage])" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "61i console.log('unsafe:', unsafe)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "62i console.log('/===============================')" /usr/lib/node_modules/npm/lib/utils/lifecycle.js | |
WORKDIR /opt | |
RUN mkdir my-time | |
WORKDIR /opt/my-time | |
RUN npm init -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ===================================== | |
# Ubuntu version | |
# ===================================== | |
FROM ubuntu | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
curl \ | |
vim \ | |
&& apt-get clean \ | |
&& apt-get autoremove \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - \ | |
&& apt-get install -y nodejs \ | |
&& npm install -g npm | |
RUN sed -i "55i console.log('===============================')" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "56i console.log('wd:', wd)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "57i console.log('npm.dir:', npm.dir)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "58i console.log('stage:', stage)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "59i console.log('pkg.name:', pkg.name)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "60i console.log('pkg.scripts[stage]:', pkg.scripts[stage])" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "61i console.log('unsafe:', unsafe)" /usr/lib/node_modules/npm/lib/utils/lifecycle.js \ | |
&& sed -i "62i console.log('/===============================')" /usr/lib/node_modules/npm/lib/utils/lifecycle.js | |
WORKDIR /opt | |
RUN mkdir my-time | |
WORKDIR /opt/my-time | |
RUN npm init -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment