Docker development environment Preview

Siberian learning Wolf 2021-11-25 18:13:53
docker development environment preview

docker In our impression, what is completed is the deployment and collaboration sharing function in the development stage , lately Docker Launched a program suitable for the development stage Docker Environmental container development .

1.1 Development environment preview

The development environment allows you to share ongoing code with team members , So you can collaborate easily . Use Dev Environments when , You can easily set up a repeatable development environment , Versioning environment details with code . You can also share your ongoing code with your team members with one click , Without having to deal with any merge conflicts , At the same time Git Move between branches to put your code on their machines .

The development environment also allows you to switch between the developer environment or the environment of team members , Move between branches to see changes in progress , Without leaving the current Git Branch .

To visit Dev Environments, Please from Docker From the menu Dashboard > Dev Environments.

1.1.1 Start single container development

  • Click create new environment . This will open “ Create a development environment ” Dialog box . Copy it and add it to Remote Git Repository On the tab Repository URL Field .
    Now? , Click create .

  • This will clone the Git Code , Determine the best image for your development environment , Last , Open... In the development environment container VS Code.

    In the example above , name wizardly_ellis and relaxed_maclaren It's randomly generated . When creating a development environment , You'll probably see different names .

Hover over the container and click VS Code Open in to start as usual in VS Code Work in China . You can also VS Code Open a terminal in , And then use Git Push or pull code to your repository , Or switch between branches and work as usual .

You can make run stay VS Code Run the command in the terminal to start the application . This will be on the port 8080 Open one on http The server . Open it in a browser http://localhost:8080 To see the running application .

1.1.2 Create a development environment from a specific branch or tag

You can do this by adding @mybranch or @tag As a suffix to your Git URL , From a particular branch ( for example , The branch corresponding to the pull request ) Or tag to create a development environment :[email protected]


[email protected]:dockersamples/[email protected]

then Docker Clone the repository with the branch or label you specify .


  • First , We use Git The credentials cloned one in the container Git The repository . Please note that , This does not conflict with any local files on your host .
  • What we need for the example project Go The tool is automatically set for us . Besides , This will not cause any friction with our local tool settings .
  • Last , We can use VS Code The terminal runs the application server in the container , And automatically access it from the host .

2.1 Share your development environment

When you're ready to share your environment , Just click the share button and specify the to push the development environment to Docker Hub Namespace .

This will create the... Of the development environment Docker image , Upload it to the... You specified in the previous step Docker Hub Namespace , And provide a small tool that can be used to share your work with team members URL.

Your team members need to open “ establish ” Dialog box , choice “ Existing development environment ” tab , Then paste URL. Your development environment is now in exactly the same state as it was when you shared it .

Use this shared development environment , Your team members can access the code 、 Any dependencies and the current Git Branch . They can also review your changes and provide feedback before you create a pull request !

3.1 Advantages and disadvantages

  • this docker dev environment The introduction of the function solves the problems caused by different development environments in the collaborative stage .
  • The disadvantage is that DEV If the container is damaged, it will cause irreversible damage to the whole project development .
  • Another point is the current way of container collaborative development Docker Only with VScode Completed docking , I hope to develop and IDEA Docking .
本文为[Siberian learning Wolf]所创,转载请带上原文链接,感谢

  1. MySQL Learning - Logging System Redo log and Bin log
  2. Springboot Common comments | @ configuration
  3. Mécanisme d'expiration du cache redis et d'élimination de la mémoire
  4. Analyse concise du code source redis 01 - configuration de l'environnement
  5. Redis source Concise Analysis 02 - SDS String
  6. Spring cloud gateway practice 2: more routing configuration methods
  7. Principe de mise en œuvre ultime du mécanisme de concurrence Java sous - jacent
  8. [démarrer avec Java 100 exemples] 13. Modifier l’extension de fichier - remplacement de chaîne
  9. Java期末作业——王者荣耀的洛克王国版游戏
  10. Elasticsearch聚合学习之五:排序结果不准的问题分析,阿里巴巴java性能调优实战
  11. Java期末作業——王者榮耀的洛克王國版遊戲
  12. Java final work - King's Glory Rock Kingdom Game
  13. 【网络编程】TCP 网络应用程序开发
  14. 【网络编程入门】什么是 IP、端口、TCP、Socket?
  15. 【網絡編程入門】什麼是 IP、端口、TCP、Socket?
  16. [Introduction à la programmation réseau] qu'est - ce que IP, port, TCP et socket?
  17. [programmation réseau] développement d'applications réseau TCP
  18. [Java Basics] comprendre les génériques
  19. Dix outils open source que les architectes de logiciels Java devraient maîtriser!!
  20. Java经典面试题详解,突围金九银十面试季(附详细答案,mysql集群架构部署方案
  21. java架构之路(多线程)synchronized详解以及锁的膨胀升级过程,mysql数据库实用教程pdf
  22. java整理,java高级特性编程及实战第一章
  23. java教程——反射,mongodb下载教程
  24. Java岗大厂面试百日冲刺 - 日积月累,每日三题【Day12,zookeeper原理作用
  25. Java后端互联网500道中高级面试题(含答案),linux钩子技术
  26. java8 Stream API及常用方法,java初级程序员面试
  27. java-集合-Map(双列)——迪迦重制版,2021Java开发社招面试解答之性能优化
  28. Flink处理函数实战之二:ProcessFunction类,java线程面试题目
  29. flex 布局详解,【Java面试题
  30. Linux basic command learning
  31. Why did docker lose to kubernetes? Docker employee readme!
  32. MySQL安装
  33. Elastic Search Aggregate Learning five: Problem Analysis of Uncertainty of sequencing results, Alibaba Java Performance Tuning Practical
  34. Installing, configuring, starting and accessing rabbitmq under Linux
  35. Oracle SQL injection summary
  36. Installation MySQL
  37. L'exposition à la photo d'essai sur la route i7 du nouveau vaisseau amiral de BMW Pure Electric a également été comparée à celle de Xiaopeng p7.
  38. spring JTA 关于异常处理的时机问题
  39. Le problème du temps de traitement des exceptions dans la JTA printanière
  40. Flink Handling Function Real War II: processfunction class, Java thread interview subject
  41. Oracle SQL injection summary
  42. [Java data structure] you must master the classic example of linked list interview (with super detailed illustration and code)
  43. Do you really know MySQL order by
  44. Record a java reference passing problem
  45. spring JTA 關於异常處理的時機問題
  46. Java - Set - Map (double file) - dija Rewriting, 2021 Java Developer's Performance Optimization
  47. Android入门教程 | OkHttp + Retrofit 取消请求的方法
  48. Java 8 Stream API and common methods, Java Junior Program interview
  49. Github 疯传!史上最强!BAT 大佬,2021年最新Java大厂面试笔试题分享
  50. git(3)Git 分支,zookeeper下载教程
  51. Java Backend Internet 500 questions d'entrevue moyennes et avancées (y compris les réponses), technologie de crochet Linux
  52. Entretien d'entretien d'usine Java post sprint de 100 jours - accumulation de jours et de mois, trois questions par jour [jour 12, fonction de principe de Zookeeper
  53. Tutoriel Java - reflection, tutoriel de téléchargement mongodb
  54. How to analyze several common key and hot issues in redis from multiple dimensions
  55. GIT (3) GIT Branch, Zookeeper Download tutoriel
  56. Tutoriel de démarrage Android | okhttp + Retrofit comment annuler une demande
  57. Design pattern [3.3] - Interpretation of cglib dynamic agent source code
  58. Share the actual operation of private collection project nodejs backend + Vue + Mysql to build a management system
  59. Springboot has 44 application initiators
  60. GitHub上标星2,java项目开发实训教程