第34月第15天 docker

1.docker

下载

http://mirrors.aliyun.com/docker-toolbox/mac/docker-for-mac/

 

  470  brew cask install docker

  471  docker --version

  472  docker info

  473  docker --version

 

  477  docker images

  478  docker pull training/webapp

  479  docker images

  482  ls ~/.docker/

  483  cat ~/.docker/config.json 

  484  cat ~/.docker/daemon.json 

  486  docker images

  487  docker ls 6fae60ef3446:/

  488  docker inspect 6fae60ef3446

  489  docker images

  490  docker run -d -P training/webapp python app.py

  491  docker ps

  493  docker ps

  494  docker port 5f03b97b38f2

  495  docker log -f 5f03b97b38f2

  496  docker logs -f 5f03b97b38f2

  497  docker top 5f03b97b38f2

  498  docker stop 5f03b97b38f2

  499  docker ps

  500  docker ps

  501  docker search ubuntu

  502  history | grep docker

  503  docker info

  504  docker images

  505  docker pull ubuntu

  506  docker images

 

  512  docker run -i -t -v /Users/yanjun/software/:/mnt/ 4c108a37151f /bin/bash

 

docker ps -a

docker commit xxx libb/javaweb:0.0.1

docker images

 

docker stop

 

 

docker run -i -t -p 28080:8080 libb/javaweb:0.0.1 /bin/bash

 

 

    //安装jdk  maven tomcat 
    tar -zxf jdk-8u144-linux-x64.tar.gz -C /usr/
    tar -zxf apache-tomcat-8.5.16.tar.gz -C /usr/
    tar -zxf apache-maven-3.5.0-bin.tar.gz -C /usr/


    vi /etc/profile
    //在文末增加 
    maven 环境
    export MAVEN_HOME=/usr/apache-maven-3.5.0
    export PATH=${PATH}:${MAVEN_HOME}/bin

    //然后运行以下命令 环境变量配置好后 执行以下命令生效
    source /etc/profile

https://www.jianshu.com/p/7f005a78483a

https://www.jianshu.com/p/49c711bd424d

 

2.maven

 

setting.xml
<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
  </mirrors>

  https://www.cnblogs.com/GodZhe/p/10832824.html

 

jetty

如果需要使用jetty:run,那么必须在maven的setting.xml下配置

 

  1. <pluginGroups>
  2. <pluginGroup>org.mortbay.jetty</pluginGroup>
  3. </pluginGroups>
     
     
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.companyname.automobile</groupId>
      <artifactId>trucks</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>trucks Maven Webapp</name>
      <url>http://maven.apache.org</url>
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <finalName>trucks</finalName>
    <plugins>
    
    </plugins>    
      </build>
    
    </project>

     

    mvn jetty:run
     
posted @ 2019-07-15 09:44  lianhuaren  阅读(180)  评论(0编辑  收藏  举报