- 博客(6)
- 资源 (1)
- 收藏
- 关注
转载 使用docker容器部署nginx
1. nginx相关路径配置目录:/etc/nginx静态页面目录:/usr/share/nginx/html2. 容器化运行nginx,搭建HTTP服务Nginx的最大作用,就是搭建一个Web Server。有了容器,只要一行命令,服务器就架设好了,完全不用配置。docker run -d \-p 8080:80 \--name mynginx \nginx部署成功后,访问...
2019-08-28 19:28:22 1053 1
转载 在docker容器中使用apt-get安装软件:Reading package lists... Done Building dependency
我是在Docker的Ubuntu容器上出现的问题,一般apt-get出现这种情况:Reading package lists... DoneBuilding dependency tree Reading state information... DoneE: Unable to locate package ****就是没有更新APT库,更新一下。sudo apt-ge...
2019-08-27 14:55:20 7620 1
转载 leetcode in Go(4)—— Median of Two Sorted Arrays,找到两个排序数组的中位数
题目There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).You may assume nums1 and ...
2019-08-05 21:22:09 203
转载 leetcode in Go(1)—— twoSum,从给定数组中找出加和为目标值的两个元素,返回这两个元素的索引
题目Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the sam...
2019-08-05 14:49:10 430
原创 docker cp 命令(用于容器与主机之间的数据拷贝)
格式docker cp 源数据目录 目标目录源数据,可以是主机目录或者是容器ID:目录。目标目录,可以是容器ID:目录或者主机目录。从主机向容器中拷贝数据把主机/www/runoob目录拷贝到容器96f7f14e99ab的/www目录下。docker cp /www/runoob 96f7f14e99ab:/www/将主机/www/runoob目录拷贝到容器96f7f14e99...
2019-08-05 12:21:45 5806
原创 linux shell中"2>&1"含义
shell中的2>&1# ls 2>1不会报没有文件2的错误,并且会在当前目录下输出一个空文件1。# ls xxx 2>1# more 1ls: xxx: No such file or directory没有xxx这个文件的错误会输出到文件1。# ls xxx 2>&1ls: xxx: No such file or directo...
2019-08-01 17:44:59 242
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人