Home  >  Article  >  Operation and Maintenance  >  Teach you how to use powershell, bash and docker in your project

Teach you how to use powershell, bash and docker in your project

PHP中文网
PHP中文网Original
2017-06-22 15:34:262134browse

This title is direct enough and candid enough. Maybe you have not used these three things in your project, but these three things will become the most HOT technologies in the next two years. What are they not? The framework is not a design pattern, but is designed for rapid deployment of programs and environments in order to solve the deployment of super complex development environments in the future. Regarding these three things, Uncle has also been researching and practicing recently. And now I will summarize some things and share them with you!

Docker role

Help us deploy your development environment on window, mac, and linux platforms. Even the operating system can be deployed quickly. Of course, some of your programs can be packaged into a mirror. No problem!

Function of powershell

Deploy your program on the windows platform, compile, generate, publish and other tasks. At the same time, you can also call some instructions, or you can Call and execute your docker container!

bash function

Deploy your program on the Linux platform. For cross-platform projects like .net core, you can also use bash to write it. The release script!

Add a note to students who are just starting to learn Dockerfile, haha ​​

FROM microsoft/aspnetcore:1.1 #使用这个镜像
ARG source #ARG指令定义了一个变量,能让用户可以在构建期间使用docker build命令和其参数–build-arg =对这个变量赋值
WORKDIR /app #工作目录
EXPOSE 80  #监听端口
COPY ${source:-obj/Docker/publish} . #复制
ENTRYPOINT ["dotnet", "WebStatus.dll"] #执行命令

The above is the detailed content of Teach you how to use powershell, bash and docker in your project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn