今天决定安装一个 nodejs - 容器来试试
# -i 互动模式,可向容器输入指令和资料
# -t 分配给这个 container 一个终端机,这样才能互动
# --rm 当你停止这个 container 後,就会自动删除
# --name 自订你的容器名称
# node:12.19 为 node 的版本容器名
# /bin/bash 由於是互动模式,也就是启动後就进入容器内的 /bin/bash 目录
sudo docker run -it --name nodejs12 node:12.19 /bin/bash
# Unable to find image 'node:12.19' locally...
node -v #v12.19.1
// 每秒印出时间, /user/time.js
function displayCurrentTime(){
const date = new Date()
console.log(date.toString())
}
setInterval(displayCurrentTime, 1000)
# 这跟先前建立的 nodejs12 是两个完全独立的环境
sudo docker run -v /user/time.js:/time.js -it --name nodejs12-2 node:12.19 /bin/bash
node time.js
# Sat Aug 21 2021 09:33:00 GMT+0000 (Coordinated Universal Time)
# Sat Aug 21 2021 09:33:01 GMT+0000 (Coordinated Universal Time)
# Sat Aug 21 2021 09:33:02 GMT+0000 (Coordinated Universal Time)
# ......
docker system prune
来清除从以上的操作中,可以得知以下事项:
改标题: 先起个头~继续Intent~官网资料 https://developer.android....
前言: 在Activity 和 Fragment 只要操作 xml 的元件,在 onCreate 时...
首先先要安装Bootstrap 5的套件 安装Bootstrap 5套件连结 •Install wi...
基础的调动WP_USER 今日要制作的功能,就是将多重的role加入到我们的使用者之上,我们可以使用...
在上一篇我们已经知道MVC路由和静态资源导入的方式 因此起手式 从新增专案.net core空专案到...