08 2021 档案
摘要:1.通过环境变量传入docker run --env HOST_IP=xxxx,通过环境变量$HOST_IP获取 2.运行docker时绑定 host docker run --network host,通过ip route获取
阅读全文
摘要:json文件路径如下 我们在main.js 中挂载到vue的根属性 Vue.prototype.$axios.get('/static/key.json').then((res) => { var passwordkey = res.data.passwordkey; console.log(pas
阅读全文
摘要:docker-compose 安装 官方地址github Linux 下安装 sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)
阅读全文
摘要:打包 # 命令 commit -a 是指定作者 -m 是描述信息 后面是运行中的容器id 以及打包后的镜像名称(必须小写) docker commit -a="xiuyuandashen" -m="My mysql" 7390be468f3a mymysql:1.0 发布 首先需要将镜像的名称改为
阅读全文
摘要:将jar包 和 Dockerfile文件放在同一个目录 由于我打包的jar里是没有配置文件的,所以我们需要把配置文件也映射到镜像中 # 基础环境镜像 FROM java:8 # 定义匿名数据卷。在启动容器时忘记挂载数据卷,会自动挂载到匿名卷 VOLUME /tmp # dockerfile 只能找到
阅读全文
摘要:配置打包规则 首先我们需要将resource 下的配置文件过滤,不要打包。 <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </inc
阅读全文
摘要:<configuration> <property name="APP_NAME" value="logConsumer"/> <property name="LOG_HOME" value="/raid/logs2" /> <contextName>${APP_NAME}</contextName
阅读全文
浙公网安备 33010602011771号