Next
This commit is contained in:
parent
8a7a3766db
commit
db308da6c1
21
Dockerfile
21
Dockerfile
@ -31,24 +31,9 @@ ADD https://atom.io/download/deb /tmp/atom.deb
|
||||
RUN dpkg -i /tmp/atom.deb && rm /tmp/atom.deb
|
||||
|
||||
########################################################
|
||||
##### nvm
|
||||
##### nvm and node and yarn and js packages
|
||||
########################################################
|
||||
RUN git clone https://github.com/creationix/nvm.git /usr/local/nvm
|
||||
ADD ./nvmsetup.sh /etc/profile.d/nvmsetup.sh
|
||||
RUN bash -c 'source /etc/profile.d/nvmsetup.sh && \
|
||||
nvm install --lts && \
|
||||
nvm use default'
|
||||
|
||||
########################################################
|
||||
##### javascript, my favorite
|
||||
########################################################
|
||||
# yes i know yarn says not to install it this way
|
||||
RUN \
|
||||
source /etc/profile.d/nvmsetup.sh && \
|
||||
nvm use default && \
|
||||
npm install -g npm && \
|
||||
npm install -g yarn
|
||||
|
||||
RUN yarn global add prettier
|
||||
RUN yarn global add create-react-app
|
||||
RUN yarn global add jetpack
|
||||
ADD ./nvm-init.sh /tmp/nvm-init.sh
|
||||
RUN bash /tmp/nvm-init.sh && rm /tmp/nvm-init.sh
|
||||
|
6
Makefile
6
Makefile
@ -1,10 +1,11 @@
|
||||
REMOTEHOST := root@las2.bounce
|
||||
IMAGENAME := sneak/dockerized-workstation
|
||||
YYYYMMDD := $(shell date +%Y%m%d)
|
||||
|
||||
default: remote-build
|
||||
|
||||
build:
|
||||
docker build -t $(IMAGENAME) .
|
||||
docker build -t $(IMAGENAME):$(YYYYMMDD) .
|
||||
|
||||
upload:
|
||||
rsync -avP --delete ./ $(REMOTEHOST):dockerized-workstation/
|
||||
@ -12,5 +13,8 @@ upload:
|
||||
remote-build: upload
|
||||
ssh -t $(REMOTEHOST) "cd dockerized-workstation && make build"
|
||||
|
||||
publish:
|
||||
ssh -t $(REMOTEHOST) "cd dockerized-workstation && docker push $(IMAGENAME):$(YYYYMMDD)"
|
||||
|
||||
tryout:
|
||||
ssh -t $(REMOTEHOST) "docker run -ti $(IMAGENAME)"
|
||||
|
3
contrib/enter
Executable file
3
contrib/enter
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run -ti sneak/dockerized-workstation /bin/bash
|
24
nvm-init.sh
Normal file
24
nvm-init.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/profile.d/nvmsetup.sh
|
||||
nvm install --lts
|
||||
nvm use default
|
||||
|
||||
# yes i know yarn says not to install it this way
|
||||
npm install -g npm
|
||||
npm install -g yarn
|
||||
|
||||
#YARN="/usr/local/nvm/versions/node/v*/bin/yarn"
|
||||
|
||||
export PATH="$PATH:/usr/local/nvm/versions/node/v*/bin"
|
||||
|
||||
NPM_PKGS="
|
||||
create-react-app
|
||||
jetpack
|
||||
now
|
||||
prettier
|
||||
"
|
||||
|
||||
for PKG in $NPM_PKGS ; do
|
||||
yarn global add $PKG
|
||||
done
|
Loading…
Reference in New Issue
Block a user