169 похожих чатов

Hi i create a volume and container with this command docker

run -it -v newvol2:temp --name ubuntocontainer ubuntu /bin/bash

after download some pkg with apt.
like tor. 13Mb

( in docker desktop show volume in use )
and exit from container.

but volume size is still 8kb
and when again start container
there is no tor pkg
why?

6 ответов

22 просмотра
...- Автор вопроса

when i remove container with this command docker rm -f newub the newvol2 not in use

For installing software inside the container you will need to create a new image. This guide should be able to help you with that: https://docs.docker.com/get-started/02_our_app/#build-the-apps-container-image

...- Автор вопроса
Jarryd Lisher
For installing software inside the container you w...

i want open ubuntu in a container install some pkg and stop container and again can join into that. and move this ubunto into other machines. this article is about just nodejs program🤔

...
i want open ubuntu in a container install some pkg...

Start at the beginning of the docker tutorial. You don‘t know what docker is used for and how to use it properly. Packages are part of the image, they are not „data“ in that sense. You create the image you want (dockerfile/docker build or with the docker commit command if it‘s a „one time thing“) with all the packages you want (db etc), then you create the volume for the DB and mount it accordingly when starting the container based on your image. The tutorial is really nice. Just skimmed through it. It explains it quite well. Does not really matter if it‘s nodejs or any other program. Just replace nodejs with your database of choice.

...- Автор вопроса
PmA
Start at the beginning of the docker tutorial. You...

aha what data can store in volume just database data?

...
aha what data can store in volume just database d...

Anythig. It’s just a folder on the host system. Instead of storing the data inside the container, you store it outside. You (basically) tell your software to store data inside „/etc/myapp/data“ and you tell docker that the folder „/etc/myapp/data“ is actually a volume (a mount point). So, docker will „link“ the internal folder to an external location where the data will be stored. Your software does not need know that. (I‘ve simplified some things, but it should be enough to get the gist)

Похожие вопросы

Обсуждают сегодня

30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
14
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Ребят в СИ можно реализовать ООП?
Николай
33
Как передать управляющий символ в открытую через CreateProcess консоль? Собсна, есть процедура: procedure TRedirectThread.WriteData(Data: OEMString); var Written: Cardinal;...
Serjone
6
в JclConsole объявлено так: function CtrlHandler(CtrlType: DWORD): BOOL; stdcall; - где ваше объявление с stdcall? у вас на картинке нет stdcall
Karagy
8
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Maksim Lapshin
20
~ 2m21s  nix shell github:nixos/nixpkgs#stack ~  stack ghc -- --version error: … while calling the 'derivationStrict' builtin at /builtin/derivation.nix:...
Rebuild your mind.
6
Карта сайта