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 ответов

9 просмотров
ali- Автор вопроса

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

ali- Автор вопроса
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🤔

ali
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.

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

aha what data can store in volume just database data?

ali
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)

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

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

Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
Вопрос по WIN32: Насколько я понимаю то все функции win32 привязаны к объектам операционной системы. Например консоль, файл, кисть, окна итд. Следовательно функции win32 упра...
Tommy Vercetti
6
Hello, can I install macOS and run flutter on a virtual machine? Is it possible to print for iphone?
Mazones
11
кто-то пользуется компонентами rx ? как их лучше ставить, через OPM? (lazarus)
Iluha Companets
15
В смысле более затратная? Общая стоимость владения лошадью меньше, чем автомобиля. В среднем.
Sergej R
10
подскажите пожалуйста, как мне освободить результат записанный в переменную result? в чем проблема подскажите если МОЖЕТЕ?
Михаил Helper
28
есть тут кто-то , кто только начал изучать си? если проходите курс на степике или как-то сами изучаете, пишите, может, скооперируемся?..
Eule
25
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Слушайте, ещё такая интересная задачка. Сделан аудит действий пользователей через триггеры в базе, соответственно каждый пользователь имеет свой логин и пароль в базе. Это пре...
Сергей Бычков
12
Скажите, тут нет проблемы? IMyInterface1 = interface function GetInterface2: IInterface2; ... function TMyInterface.GetInterface2: IInterface2; begin Result := TI...
Ruslan aka DUDE
18
Карта сайта