In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
DockerfileFROM openjdk:8WORKDIR / hgs/java/#RUN ["/ bin/sh", "- c", "rm-f / hgs/java/docker.jar"] COPY. / docker.jar / hgs/java/COPY. / test.sh / hgs/java/#CMD java-cp / hgs/java/docker.jar dockertest.t.MainCMD sh. / test.sh1.docker container Runtime files are not visible to the outside. Container disappears after the exit provides three ways to manage files volumes,bind mounts for this docker. Volumes: managed by docker / var/lib/docker/volumes/ on Linux can be created by docker volume create bind mounts: is the absolute path of the machine does not need to pre-exist tmpfs: put in memory 2. Create volume docker volume create my-vol to view the details of volume docker volume ls volume docker volume inspect my-vol delete volume docker volume rm my-vol run container under the specified volume (version 1.13.1 docker may not support-- mount discussed here-v (--volume)) docker run-d-v my-vol:/hgs/tmp hello:1.1 docker run-v myv:/hgs / x hello:1.1 # myv:/hgs/x is consistent with Dockerfile's WORKDIR to remove files under volume This operation actually starts a container of centos:7 to delete docker run-- rm-v fjava:/hgs/centos centos:7 rm-rf / hgs/centos/docker.jar publish image to library docker save fjava1:latest-o / home/fjava.tar.gz #-o specify export path export image docker load-I / home/fjava.tar.gz # #-I /-- input specify import path
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.