build
docker build . -t $image
view
docker run -it --rm=true $image sh
module, import,root, commonjs, commonjs2,amd-require, amd, amd-require, umd, umd2, global, , jsonp, node-commonjs, promise, self, system, script, this, var, window |
build: update all dependencies | |
> npx npm-check-updates -u --deep | |
- resolve conflicts | |
> npm update -f | |
> npm audit fix --force | |
- run tests > npm test -- --allbuild: update all dependencies | |
> npx npm-check-updates -u --deep | |
- resolve conflicts |
# build the docker image | |
# tag with gcr.io/* to upload to google container registry | |
docker build . -t gcr.io/project-id/tag | |
# or tag an existing image | |
docker pull my-image | |
docker tag gcr.io/project-id/tag | |
# push the tagged image | |
docker push gcr.io/project-id/tag |
to customize Google cloud shell, modify on of the following files:
notes
# disk usage sort by size | |
# -h: human readable | |
du -h --max-depth=1 $path | sort -h | |
# current dir: | |
du -h --max-depth=1 | |
# delete a directory | |
rm -r -f <dirName> |
## generating a SSH key for a github account (i.e: login to your github account in the local machine) | |
//1- in the local machine: | |
$ git config --global user.name "John Doe" | |
$ git config --global user.email github@email | |
//check for existing key: | |
ls -al ~/.ssh |
# install code-server using the script | |
curl -fsSL https://code-server.dev/install.sh | sh | |
# add code-server to $PATH. | |
# to set $PATH permenantly (i.e after restarts), add this line to $HOME/.customize_environment or .bashrc file | |
# https://cloud.google.com/shell/docs/configuring-cloud-shell#environment_customization_script | |
# change `code-server-3.9.0-linux-amd64` if needed. | |
> nano $HOME/.customize_environment | |
export PATH="$PATH:$HOME/code-server-3.9.0-linux-amd64/bin" |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |