In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "introduction of development kit tools based on Docker package". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Based on the development package developed by Docker1.12+ (Docker API 1.24 +), by encapsulating Docker API, developers can quickly use Java to develop applications to control and operate Docker, using streaming operation, simple and clear.
To provide Javaer friends with a convenient and direct way to operate Docker.
The coverage rate of perfect test cases is 87%.
JDocker is a subproject of the Voovan open source project, which naturally depends on the voovan open source project.
Maven dependency on Voovan projects: org.voovanvoovan-framework1.0-beta-*, connects to Docker by setting environment variables in org.voovan.docker.DockerGlobal.
Public static String DOCKER_REST_HOST = "127.0.0.1"; public static int DOCKER_REST_PORT = 2735; public static String DOCKER_REST_CHARSET = "UTF-8"; public static int DOCKER_REST_TIMEOUT = 5; public static boolean DEBUG = false
Create a container using JDocker:
/ / construct a creation command CmdContainerCreate createCmd = CmdContainerCreate.newInstance ("d_test") / use streaming operation to create container Object data = createCmd.image ("alpine"). Network ("bridge") .volume ("v_tx:/v_tx"). Link ("dockerfly:dockerfly") .cmd ("ping", "127.0.0.1"). Env ("author=helyho") .exposePort (22, "tcp", "2222"). Send () CreateCmd.close (); Logger.info (formatJSON (data)); "introduction to development kit tools based on Docker encapsulation" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.