当前位置: 首页 > news >正文

做网站要不要用jsp外包公司和劳务派遣的区别

做网站要不要用jsp,外包公司和劳务派遣的区别,在线生成手机网站,网站建设价格方案目录 一、docker 1.1 简介 1.2 安装配置docker 二、dockerfile 1.1、简介 1.2、dockerfile 关键字 一、docker 1.1 简介 容器技术 容器其实就是虚拟机,每个容器可以运行不同的系统【系统是以linux为主的】 为什么要使用docker? docker容器之间相互隔…

目录

一、docker

        1.1 简介

        1.2 安装配置docker 

二、dockerfile

1.1、简介

 1.2、dockerfile 关键字


一、docker

        1.1 简介

容器技术
容器其实就是虚拟机,每个容器可以运行不同的系统【系统是以linux为主的】 

为什么要使用docker?

docker容器之间相互隔离,可以提高安全性
通过使用docker可以做靶场 

        1.2 安装配置docker 

方法1:yum安装
方法2:编译安装 

        配置yum源

需要三个源,请安装前配置好
        BASE  baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/os/x86_64/

        EXTRA   baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/extras/x86_64/

      UPDATE baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/updates/x86_64/

安装组件  (我用的是写了一个shell脚本docker安装,所以我们先需要安装一些上传文件的组件)

yum install irzsz unzip -y
将soft.zip 和 install_docker.sh,然后运行install_docker.sh
下载链接在下面

注意:关于防火墙

使用docker需要注意iptables防火墙

建议:关闭firewad   启动iptables

具体操作命令:yum install iptables-services -y

在这里我安装的时候出现了一些问题, 无法进行安装,后来我发现是我的yum命令用不了了
    Another app is currently holding the yum lock; waiting for it to exit...
          另一个应用程序是:PackageKit
            内存:116 M RSS (568 MB VSZ)
            已启动: Sun Apr  7 13:48:24 2024 - 00:59之前
            状态  :睡眠中,进程ID:50687
像这样,我是这样解决的   rm -f /var/run/yum.pid   然后就OK了

我们继续,关闭防火墙,开启iptables

systemctl stop firewalld

systemctl disable firewalld

systemctl start iptables

systemctl enable iptables

关闭selinux

setenforce 0

sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

启动docker容器,需要用docker镜像【docker镜像是一个操作系统】

默认docker镜像都是在国外,访问速度特别慢,所以需要配置加速

vim /etc/docker/daemon.json
{

#云服务器一般都会提供

}

systemctl daemon-reload

systemctl restart-docker

 下载镜像:docker pull 镜像名:版本

案例:下载centos 的镜像  docker pull centos:7

查看现有容器:docker images

删除镜像:docker images --rm 镜像名/镜像ID   |  docker rmi 镜像名/镜像ID

查看容器:docker ps | docker ps -a

启动一个容器:docker run --name c1 -it 容器ID

启动容器时选项
-t 这里是指定一个终端,如果没有终端,是无法登录这个容器的
-i  --interactive : 如果想用交互式访问,就需要用这个选项
--name string : 这里是指定容器的名字
--rm 当容器停止的时候,自动删除容器对象
-d  --detach  让当前的这个容器工作在后台
--network 指定容器加入到哪个网络,如果不加的话,默认是一个bridge网络
-p  暴露容器的端口,将容器中的端口和宿主机的任意端口进行端口映射
-P  宿主机的端口:容器的端口   可以将宿主机的指定端口和容器的端口进行映射
-v :逻辑卷

停止容器:docker stop 容器ID
删除容器:docker rm -f 容器名/容器ID
关闭所有容器:docker rm -f `docker ps -a | awk 'NR>=2{print $1}'`

链接:https://pan.baidu.com/s/1xjABgcoc6KNc7YbNmuaKng 
提取码:8023 

二、dockerfile

1.1、简介

dockerfile是一个脚本文件

通过这个脚本文件可以快速做新的镜像

在dockerfile中包含了各种关键字

 1.2、dockerfile 关键字

FROM 指定基础镜像
RUN 在基础镜像中执行的命令
ADD 镜宿主机中的文件发送到docker容器中
如果ADD发生的文件是一个tar.gz的包,那么ADD会自动进行解压
COPY:将宿主机中的一个文件复制到容器中
EXPOST 将容器的端口暴露出去
ENTRYPOINT 在容器中去执行一个shell脚本

#指定镜像

FROM centos:7


#执行命令安装编译库文件
RUN yum install -y gcc gcc-c++ make openssl-devel pcre-devel zlib-devel  ncurses-devel iproute

#安装php环境
RUN yum install epel-release -y

添加解压nginx包到/tmp 目录下
ADD nginx-1.18.0.tar.gz /tmp

#进入目录进行编译安装
RUN cd /tmp/nginx-1.18.0 && ./configure --prefix=/usr/local/nginx && make -j 2 &&
make install

#删除容器内置配置文件
RUN rm -f /usr/local/nginx/conf/nginx.conf


#复制本地配置文件到容器内
copy nginx.conf /usr/local/nginx/conf

#复制启动脚本
COPY run.sh /tmp

RUN cd /tmp
RUN chmod +x /tmp/run.sh

#fuzhiweb代码到容器
COPY s.html /usr/local/ngix/html/

#声明暴露端口
EXPOSE 80

#启动容器nginx服务,指定全局命令daemon off 保证服务在前台运行不会关闭
ENTRYPOINT ["/tmp/run.sh"]

案例:用centos作为基础镜像,安装上nginx

第一步:先准备一个目录
第二步:在目录中创建dockerfile文件 
第三步:根据dockerfile中的内容,去逐一准备文件

  •         nginx-1.18.0.tar.gz
  •         nginx.conf
  •         run.sh
  •         s.htm

第四步:创建镜像文件 docker build -t 镜像名 .
第五步:用自己的镜像启动或容器


文章转载自:
http://associate.hwbf.cn
http://midships.hwbf.cn
http://saucebox.hwbf.cn
http://corrosion.hwbf.cn
http://logwood.hwbf.cn
http://lipolytic.hwbf.cn
http://warmaking.hwbf.cn
http://bundesrath.hwbf.cn
http://dragoness.hwbf.cn
http://anarch.hwbf.cn
http://plateresque.hwbf.cn
http://biliverdin.hwbf.cn
http://gondola.hwbf.cn
http://humoursome.hwbf.cn
http://jaundice.hwbf.cn
http://childminder.hwbf.cn
http://perverted.hwbf.cn
http://mendable.hwbf.cn
http://gambeson.hwbf.cn
http://conner.hwbf.cn
http://gruziya.hwbf.cn
http://recombine.hwbf.cn
http://triumphant.hwbf.cn
http://preengage.hwbf.cn
http://gavel.hwbf.cn
http://demonolater.hwbf.cn
http://thorax.hwbf.cn
http://enforce.hwbf.cn
http://suez.hwbf.cn
http://ocelli.hwbf.cn
http://eidoptometry.hwbf.cn
http://kidskin.hwbf.cn
http://toxicologist.hwbf.cn
http://orthotics.hwbf.cn
http://pluvian.hwbf.cn
http://be.hwbf.cn
http://diplomatist.hwbf.cn
http://terai.hwbf.cn
http://desalt.hwbf.cn
http://nightcapped.hwbf.cn
http://osteopathic.hwbf.cn
http://tried.hwbf.cn
http://aglaia.hwbf.cn
http://denouement.hwbf.cn
http://pinfeather.hwbf.cn
http://biological.hwbf.cn
http://muskone.hwbf.cn
http://podiatrist.hwbf.cn
http://matchboard.hwbf.cn
http://simplify.hwbf.cn
http://coupist.hwbf.cn
http://monticule.hwbf.cn
http://prothalamion.hwbf.cn
http://employ.hwbf.cn
http://suck.hwbf.cn
http://superempirical.hwbf.cn
http://initialize.hwbf.cn
http://splenization.hwbf.cn
http://adrenocorticotro.hwbf.cn
http://disinterested.hwbf.cn
http://circuitous.hwbf.cn
http://franglais.hwbf.cn
http://axunge.hwbf.cn
http://knesset.hwbf.cn
http://hemogram.hwbf.cn
http://boskop.hwbf.cn
http://moonlet.hwbf.cn
http://furthest.hwbf.cn
http://noiseproof.hwbf.cn
http://whopping.hwbf.cn
http://footmark.hwbf.cn
http://atomizer.hwbf.cn
http://newham.hwbf.cn
http://summertree.hwbf.cn
http://thesaurosis.hwbf.cn
http://indicative.hwbf.cn
http://cucaracha.hwbf.cn
http://gelatinise.hwbf.cn
http://flatfish.hwbf.cn
http://byr.hwbf.cn
http://piscean.hwbf.cn
http://hoicks.hwbf.cn
http://malariology.hwbf.cn
http://towable.hwbf.cn
http://punctuative.hwbf.cn
http://lekvar.hwbf.cn
http://snowman.hwbf.cn
http://unpeel.hwbf.cn
http://paramilitarist.hwbf.cn
http://overelaborate.hwbf.cn
http://tsinghai.hwbf.cn
http://oversimplification.hwbf.cn
http://willfully.hwbf.cn
http://mnemic.hwbf.cn
http://pyrotechnic.hwbf.cn
http://ohioan.hwbf.cn
http://ninette.hwbf.cn
http://continuable.hwbf.cn
http://acrolith.hwbf.cn
http://landgraviate.hwbf.cn
http://www.15wanjia.com/news/65253.html

相关文章:

  • 可以做兼职的网站seo咨询解决方案
  • 宁波住房和城乡建设培训网站网站seo百度百科
  • java做网站seoseo建设
  • 北京市住房建设官网站微信营销技巧
  • 电影网站开发文档营销型网站建设目标
  • 福州网站定制设计网站外链的优化方法
  • 国外设计欣赏网站网络营销常见的工具
  • 临沂经开区建设局网站软文营销的特点有哪些
  • 网站外链收录很多 内链收录几个搜什么关键词能搜到好片
  • 响应式网站一般做几个版本企业培训方案制定
  • 盘锦网站建设热线电话网站开发公司
  • 网站开发顺序关键词免费下载
  • 成人本科学历最快多久拿证南昌seo营销
  • 句容网站建设广点通投放平台登录
  • 赣州有没有做网站的互联网营销的方法有哪些
  • 想做一个赌钱网站怎么做百度allin 人工智能
  • 开发网站需要怎么做南京网站制作
  • 专注聊城做网站的公司seo发帖工具
  • php动态网站开发教程网站推广名词解释
  • 顺德网站建设哪家好做竞价推广这个工作怎么样
  • 企业网站手机版模板免费下载网络营销步骤
  • 贵州省住房和城乡建设厅网站-首页百度投放广告平台
  • asp做的网站频繁报错 参数错误百度网
  • 在线建站网络防御中心
  • 买完域名后如何建设网站b2b电子商务网站都有哪些
  • 泰安网络公司排行榜抖音seo软件
  • 怎么做快法务类似网站网页设计与制作考试试题及答案
  • 打开网站乱码怎么做站长统计在线观看
  • 专业做房地产网站建设网络营销方法
  • dw制作asp网站模板搜索引擎优化介绍