Git Product home page Git Product logo

springboot's Introduction

1、docker常用命令使用

1.1 docker rm 命令强制删除容器

docker rm -f

1.2 docker rmi 命令强制删除镜像

docker rmi -f

1.3 docker build 命令 强制指定Dockerfile文件进行编译

docker build -t 镜像名称:镜像版本号-f Dockerfile文件目录  编译镜像的目录

1.4 docker tag 和 docker push命令结合的使用

  • 将镜像打一下标签,然后安照标签和版本号进行推送到私服里面,标签名就以服务名和版本号即可
docker tag  镜像名称:镜像版本号   私服URL地址/镜像名称:镜像版本号    
  • 推镜像到私服里面
docker push 私服URL地址/镜像名称:镜像版本号

1.5 docker save 命令保存编译之后镜像文件存放到指定路径

docker save 镜像名称 -o 保存文件的路径/镜像名称.tar.gz

2、Dockerfile的使用

  • FROM 来自哪里,一个Dockerfile必须有一个FROM关键字
  • MAINTAINER 构建作者
  • RUN 运行关键字
  • WORKDIR 切换工作目录
  • EXPOSE 暴露端口
  • ADD 添加或说是拷贝
  • CMD 执行命令(command)

3、shell脚本的使用

  • ehco 输出的命令的使用
  • mkdir -p 的命令的使用,-p表示父目录下面的子目录也进行创建

4、git常见命令

4.1 Git全局设置

git config --global user.name "admin"
git config --global user.email "[email protected]"
4.2 创建一个仓库
git clone ssh://[email protected]:7003/root/springbootx.git
cd springbootx
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

4.3 推送现有文件夹

cd existing_folder
git init
git remote add origin ssh://[email protected]:7003/root/springbootx.git
git add .
git commit -m "Initial commit"
git push -u origin master

4.4 推送到现有的Git存储库

cd existing_repo
git remote rename origin old-origin
git remote add origin ssh://[email protected]:7003/root/springbootx.git
git push -u origin --all
git push -u origin --tags

5、maven的pom.xml关键配置

<!--docke rmaven编译插件-->
<build>
  <finalName>springboot</finalName>
  <plugins>
	<plugin>
		<groupId>com.spotify</groupId>
		<artifactId>docker-maven-plugin</artifactId>
		<version>0.4.12</version>
		<configuration>
			<dockerDirectory>${project.basedir}</dockerDirectory>
			<resources>
				<resource>
					<targetPath>/</targetPath>
					<directory>${project.build.directory}</directory>
					<include>${project.build.finalName}.jar</include>
				</resource>
			</resources>
		</configuration>
	</plugin>
  </plugins>
</build>

6、profiles的参数

  • 以开发环境进行执行运行工程
java -jar springboot.jar --spring.profiles.active=dev
  • 以测试环境进行执行运行工程
java -jar springboot.jar --spring.profiles.active=test

springboot's People

Contributors

jilongliang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.