容器化-Docker volume数据卷

Nginx 高可用架构实践:Keepalived 实现故障自动切换,Keepalived主备模式(双机热备),Keepalived互备模式(互为主备,互持 VIP) 本文介绍了利用Keepalived实现Nginx高可用的两种架构模式。主备模式使用1个虚拟IP,主节点提供服务,备节点监控待命;互备模式使用2个虚拟IP,两节点同时服务。Keepalived基于VRRP协议实现故障自动切换,通过vrrp_script监控Nginx状态。配置参数包括全局定义、健康检查脚本和VRRP实例设置,其中priority决定节点优先级,weight动态调整优先级。主备模式适合中小系统,互备模式适合高并发场景,确保服务持续可用。 阅读详情

什么是volume

数据卷就是将容器的数据存储到主机上,方便进行持久化存储。

含义:Linux文件可以挂载到容器中,Linux文件可以复制到容器中。

文件挂载

目标:Linux主机上面的nginx.conf配置文件挂载到 nginx 容器中。

nginx.conf ------> /usr/local/nginx/conf/nginx.conf

创建 volumes 文件夹,并创建 nginx.conf 文件

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

#gzip  on;

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        proxy_pass  http://mywebapi:80;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
   }
 }

复制 docker-compose.yml 到 volumes

cp network/docker-compose.yml volumes/

修改 docker-compose.yml

version: '3'
services:
   mynginx:
        build: /root/nginx
        ports:
            - 8090:80
        networks:
            - nginx_webapi
        volumes:
            - /root/volumes/nginx.conf:/usr/local/nginx/conf/nginx.conf
   mywebapi:
       build: /root/webapi
       ports:
            - 8091:80
       networks:
            - nginx_webapi
networks:
   nginx_webapi:
        external:  true

重新执行

docker-compose up -d

这样就可以把 /root/volumes/nginx.conf 文件挂载到容器中的 /usr/local/nginx/conf/nginx.conf。

除了可以把主机文件挂载到容器中,另外也可以把主机目录挂载到容器中或把容器目录挂载到主机中。

nginx代理解决跨域问题 跨域(Cross-Origin)是指在 Web 开发中,一个网页的运行脚本试图访问另一个网页的资源时,这两个网页的域名、协议或端口号任何一个不同,就被称为跨域。跨域是由浏览器的同源策略(Same-Origin Policy)所限制的。同源策略是一种安全机制,它防止一个网页的脚本去读取另一个不同域名的网页内容。同源策略要求两个网页的协议、主机和端口号必须完全相同,否则就会出现跨域问题。简单来说,同源策略要求不同域名的网页之间不能相互访问对方的资源。 阅读详情

相关推荐

Docker容器化技术入门与实战指南

容器化技术通过操作系统级虚拟化实现应用隔离,其核心原理是利用命名空间和cgroups机制。相比传统虚拟机,容器具有启动速度快、资源占用少等优势,已成为云原生领域的基础技术。Docker作为最流行的容器引擎,通过镜像分层机制实现高效构建与分发,广泛应用于开发环境标准化、微服务部署等场景。本指南涵盖从镜像构建到容器编排的全流程实践,特别针对国内用户提供了镜像加速配置方案,并深入解析了数据卷管理、网络配置等生产环境必备技能。

weixin_42614269的博客 347

Nginx 配置 HTTP 代理

配置如下 #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events {...

adbc12256的博客 369

Docker发布Springboot项目

一、准备jar包 二、创建Dockerfile文件 创建一个目录比如Dockerfile mkdir -p /data/Dockerfile 创建一个Dockerfile文件 cat <<'EOF' > /data/Dockerfile/mydemo/Dockerfile FROM openjdk:8-jdk-alpine VOLUME /tmp COPY *.jar myapp.jar ENTRYPOINT ["java","-jar","/mydemo.jar"] EOF

大唐响马的博客 1445

【Nginx】nginx 负载均衡时,一台tomcat宕机时的问题 可以做到自动切换

如果Nginx没有仅仅只能代理一台服务器的话,那它也不可能像今天这么火,Nginx可以配置代理多台服务器,当一台服务器宕机之后,仍能保持系统可用。具体配置过程如下: 1.在http节点下,添加upstream节点。 upstream linuxidc { server 10.0.6.108:7080; server 10.0.0.85:8980; } 2.将server节......

分享记录开发中的问题,欢迎一起探讨! 3372

从零到一:基于Docker的Nginx容器化部署与镜像定制实战

本文是一篇详细的实战指南,手把手教你从零开始,基于Docker完成Nginx的容器化部署与镜像定制。内容涵盖Docker环境安装、拉取运行Nginx容器、通过数据卷实现内容持久化,并重点演示了如何编写Dockerfile来定制专属的Nginx镜像,最后探讨了使用Docker Compose进行多容器编排的入门思路,助你快速掌握生产级应用的容器化部署核心技能。

weixin_29207533的博客 98

Docker使用详细介绍

Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux或Windows操作系统的机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口。容器(Container):镜像中的应用程序运行后形成的进程就是容器,只是Docker会给容器做隔离,对外不可见。1、新建一个空的目录,例如tmp,然后在目录中新建一个文件,命名为Dockerfile。-p :将宿主机端口与容器端口映射,冒号左侧是宿主机端口,右侧是容器端口。

bjzhang75的博客 1185

【Docker基础】Docker数据卷管理:docker volume inspect及其参数详解

掌握docker volume inspect的格式化输出功能,可以快速集成到监控系统中,实现数据卷的自动化管理,建议结合docker volume ls命令定期检查数据卷使用情况,结合docker system df监控磁盘空间,确保容器化系统的稳定运行。在容器化应用中,数据持久化是永恒的难题。当容器生命周期结束,其内部数据也会随之消失,而通过docker volume管理的数据卷则能完美解决这个问题。需要找到Nginx容器中/usr/share/nginx/html的实际存储位置。

IT成长日记的博客 952

nginx负载均衡配置,宕机自动切换方式

主要介绍了nginx负载均衡配置,宕机自动切换方式,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧

【Docker基础】Docker数据卷管理:docker volume rm与prune命令对比

在Docker容器化应用中,数据卷(Volume)是实现数据持久化的核心机制。然而随着容器生命周期的不断变化,未被及时清理的卷会逐渐累积形成"数据孤岛",不仅占用磁盘空间,更会增加运维复杂度。本文将对比docker volume rm和docker volume prune两个核心命令,并结合使用示例给出简单的使用建议。理解两者的核心区别并配合过滤机制使用,可以在保证数据安全的前提下有效管理系统资源,建议在生产环境中建立定期清理机制,并始终遵循"显式命名+标签保护"的数据管理策略。中(需确认卷未被使用)

IT成长日记的博客 1341

FPGA中的CMAC硬核与Interlaken硬核

CMAC硬核和Interlaken硬核是FPGA中两种重要的内置功能模块,它们分别在CNN推理和高带宽芯片到芯片接口方面发挥着关键作用。FPGA(Field Programmable Gate Array,现场可编程逻辑门阵列)中的CMAC硬核与Interlaken硬核是两种重要的内置功能模块,它们在FPGA设计中扮演着关键角色。需要注意的是,FPGA设计中的硬核选择不仅取决于硬核本身的性能,还需要考虑硬核与FPGA芯片其他部分的兼容性、功耗、成本等因素。Interlaken硬核。

weixin_41230430的博客 1479

MySQL等保三级合规实践:如何安全配置root账户的本地与受信主机登录策略

本文详细介绍了MySQL在等保三级合规框架下如何安全配置root账户的本地与受信主机登录策略。通过分析root账户的特殊保护需求,提供三种安全加固方案,包括限制访问范围、限定登录IP和完全禁止远程登录,并指导创建安全的远程管理账户。文章还涵盖了密码策略强化、日志审计配置和网络层防护等关键合规要求,帮助用户实现MySQL的等保三级全面合规。

weixin_42522964的博客 259

Dockerfile(14) - VOLUME 指令详解

VOLUME 一句话总结 作用:创建一个匿名数据卷挂载点 格式:VOLUME ["/data"] 详解:运行容器时可以从本地主机或其他容器挂载数据卷,一般用来存放数据库和需要保持的数据等 实际栗子 VOLUME ["/data"] 这里的/data目录就会在运行时自动挂载为匿名卷,任何向 /data 中写入的信息都不会记录进容器存储层,从而保证了容器存储层的无状态化 容器运行...

qq_33801641的博客 1862

别再死磕MuJoCo了!用PyBullet+Stable-Baselines3搞定机械臂强化学习(保姆级环境配置)

本文详细介绍了如何使用PyBullet和Stable-Baselines3构建机械臂强化学习系统,绕过昂贵的MuJoCo许可壁垒。通过实战指南,包括环境配置、机械臂Gym环境构建、训练策略与调优技巧,帮助开发者快速掌握机器人强化学习技术,提升智能控制效率。

weixin_42667269的博客 264

Docker 基础知识 + 实操

部分图片来自于网上部分博主。

2301_80387628的博客 621

从原理图到代码:深入解析SX1278 LoRa模块与STM32的SPI通信驱动(附完整工程)

本文深入解析了SX1278 LoRa模块与STM32的SPI通信驱动实现,从硬件原理图到完整工程代码,详细介绍了LoRa技术的通信原理、寄存器配置、SPI接口设计及低功耗优化策略。适合物联网开发者和嵌入式工程师提升远距离无线通信能力,附完整工程代码助力快速开发。

weixin_42715608的博客 423

吉林大学2016级唐班c语言期末考试B卷

` #include<stdio.h> #include<stdlib.h> //双指针法,每次从a,b中选一个最大的数,从后向前一次放在数组a中 int merge(int *a,int m,int *b,int n){ int i=m-1,j=n-1,k=m+n-1; while(i>=0&&j>=0){ if(a[i]>b[j])a[...

weixin_42339173的博客 1195

一篇文章教你轻松玩转Docker数据卷

volume 在容器创建时就会初始化,在容器运行时就可以使用其中的文件。volume 能在不同的容器之间共享和重用。对volume中数据的操作会马上生效。对volume中数据的操作不会影响镜像本身。volume的生存周期独立于容器的生命周期,即使删除容器,volume仍然会存在,没有任何容器使用的volume也不会被Docker删除。

m0_74824496的博客 204

ubuntu17.04 UHD 驱动出错

ubuntu 17.04 源码安装UHD

xrh003的博客 1万+

Docker-存储

Docker存储与资源管理摘要 一、Docker存储机制 数据卷特性:Docker采用写时复制机制,通过数据卷(volume)解决联合文件系统的访问和共享问题,支持volumes、bind mounts和tmpfs三种挂载方式。数据卷独立于容器生命周期,可实现持久化存储和容器间数据共享。 二、数据卷操作 创建与管理:可通过docker volume create创建命名卷,或运行时自动生成匿名卷。支持目录/文件挂载(需绝对路径)和读写权限控制(如:ro只读模式)。 实用功能:包括容器间共享卷(--volum

m0_68754495的博客 1280

汽车IVI中控开发入门及进阶(九):显示屏

显示屏Display panel和触控屏Touch panel,可以说随着汽车四化的进展,屏越来越多,越来越大,越来越高清,成为IVI中控、智能座舱系统的重要组成部分。比如如下一个电阻触摸屏。正文:显示屏主要功能就是显示,车载内容和信息的传递全靠显示屏,目前车载显示屏的种类可以分为:LCD液晶显示屏(TFT(薄膜晶体管)驱动的有源矩阵液晶显示,再细分IPS、TFT、SLCD,这几个子类)、LED显示屏(用 LED发光二极管作为背光光源)、OLED 显示屏。

码农17年的博客 2525

运行codex时出现登录失败:failed to start login server: 以一种访问权限不允许的方式做了一个访问套接字的尝试。 (os error 10013) 解决方案

的本质是Windows 系统端口保留策略而非代码 bug。推荐使用方案一(调整动态端口范围),一劳永逸解决。如果你安装了 Docker Desktop 或启用了 WSL2,调整端口范围后记得检查相关服务是否正常运行。

一键难忘的博客 4152

【Docker 原理】Docker 数据持久化完全指南:三种挂载原理、数据卷实操、数据库落地实战

开发调试、代码热更 → Bind Mount生产持久化、数据库、正式业务 → Volume(唯一首选)临时缓存、敏感临时数据 → tmpfs容器数据丢失本质:容器读写层随容器删除销毁,无落地存储;Volume 生产首选、Bind 仅开发、tmpfs 临时使用;数据卷完全解耦容器,支持增删改查、备份迁移、跨环境复用;所有数据库容器生产部署,必须基于 Volume 实现持久化,杜绝数据丢失;单数据卷支持多容器共享,适用于服务协同、资源统一分发场景。

十年老程序猿,AI 疯狂研究专家,前沿硬核知识分享 422

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

Java实习模拟面试之Docker核心:深入理解数据卷挂载与持久化

特性Volumes存储位置宿主机任意路径Docker管理的目录宿主机内存持久化是是否性能最高高极高可移植性低高中管理手动Docker管理Docker管理我的选择原则生产环境数据库、日志→ 使用Volumes。开发环境代码共享→ 使用。敏感信息、临时缓存→ 使用tmpfs。通过这场模拟面试,我们深入探讨了Docker数据卷的核心概念、三种挂载方式的区别、MySQL持久化部署以及关键的备份恢复策略。作为Java实习生,理解并掌握数据卷挂载。

吾为热爱计科,致力于知识分享的践行者,此博客是我在这条道路上留下的足迹。 746

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

【资深架构师亲授】PHP容器化数据卷设计的7个最佳实践

掌握PHP容器化数据卷设计精髓,解决应用持久化与共享难题。涵盖开发、测试、生产环境适用场景,讲解挂载策略、权限控制、性能优化等7大实践方法。提升部署效率与系统稳定性,值得收藏。

ProceChat的博客 920

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Docker数据卷在PHP项目中的真实应用场景,你知道几个?

掌握PHP容器化数据卷应用,解决开发与部署难题。涵盖日志持久化、配置共享、多容器数据同步等真实场景,详解挂载方式与最佳实践,提升项目可维护性与稳定性。值得收藏

InstrIsle的博客 715

# Docker 笔记Day01:仓库配置与软件安装,基础命令,数据卷,Dockerfile构建镜像(附核心命令速查表)

资源地址Docker 官网Docker Hub(国内)Docker Hub(国际,需科学上网)定义匿名数据卷,在启动容器时如果用户没有挂载数据卷,会自动挂载到匿名卷。避免重要的数据因容器重启而丢失(这是非常致命的)避免容器不断变大VOLUME ["<路径1>", "<路径2>..."]VOLUME <路径>指定工作目录。用 WORKDIR 指定的工作目录,会在构建镜像的每一层中都存在(WORKDIR 指定的工作目录必须是提前创建好的)。

weixin_46136019的博客 479
上一篇: 容器化-Docker容器网络
下一篇: 责任链模式与中间件原理
似水明俊德
博客等级 码龄8年 247粉丝 276原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值