How to run vi on docker container?2019 Community Moderator ElectionHow do I edit a file after I shell to a Docker container?How to symlink a file in Linux?How to exit the Vim editor?How is Docker different from a virtual machine?How do I find all files containing specific text on Linux?How to get a Docker container's IP address from the host?Copying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repositoryFrom inside of a Docker container, how do I connect to the localhost of the machine?How do I get into a Docker container's shell?
How can a new country break out from a developed country without war?
pipe commands inside find -exec?
Is there any common country to visit for uk and schengen visa?
What is the difference between something being completely legal and being completely decriminalized?
Why is participating in the European Parliamentary elections used as a threat?
Air travel with refrigerated insulin
How to balance a monster modification (zombie)?
What are the rules for concealing thieves' tools (or items in general)?
is this saw blade faulty?
What is the tangent at a sharp point on a curve?
Why are there no stars visible in cislunar space?
"Marked down as someone wanting to sell shares." What does that mean?
What will the Frenchman say?
Why is "la Gestapo" feminine?
Why I don't get the wanted width of tcbox?
How to read string as hex number in bash?
How can an organ that provides biological immortality be unable to regenerate?
DisplayForm problem with pi in FractionBox
Should I be concerned about student access to a test bank?
Do I need an EFI partition for each 18.04 ubuntu I have on my HD?
Print a physical multiplication table
Unfrosted light bulb
Turning a hard to access nut?
Error in master's thesis, I do not know what to do
How to run vi on docker container?
2019 Community Moderator ElectionHow do I edit a file after I shell to a Docker container?How to symlink a file in Linux?How to exit the Vim editor?How is Docker different from a virtual machine?How do I find all files containing specific text on Linux?How to get a Docker container's IP address from the host?Copying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repositoryFrom inside of a Docker container, how do I connect to the localhost of the machine?How do I get into a Docker container's shell?
I have installed docker on my host virtual machine. And now want to create a file using vi
.
But it's showing me an error:
bash: vi: command not found
linux docker vi
|
show 2 more comments
I have installed docker on my host virtual machine. And now want to create a file using vi
.
But it's showing me an error:
bash: vi: command not found
linux docker vi
1
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
1
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
It depends on whichimage
you are building from. Most probablyimage
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.
– illusionist
Jul 20 '15 at 13:59
2
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
3
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21
|
show 2 more comments
I have installed docker on my host virtual machine. And now want to create a file using vi
.
But it's showing me an error:
bash: vi: command not found
linux docker vi
I have installed docker on my host virtual machine. And now want to create a file using vi
.
But it's showing me an error:
bash: vi: command not found
linux docker vi
linux docker vi
edited Jan 4 '18 at 10:25
Line
92911129
92911129
asked Jul 20 '15 at 11:55
Krati JainKrati Jain
169123
169123
1
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
1
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
It depends on whichimage
you are building from. Most probablyimage
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.
– illusionist
Jul 20 '15 at 13:59
2
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
3
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21
|
show 2 more comments
1
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
1
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
It depends on whichimage
you are building from. Most probablyimage
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.
– illusionist
Jul 20 '15 at 13:59
2
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
3
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21
1
1
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
1
1
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
It depends on which
image
you are building from. Most probably image
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.– illusionist
Jul 20 '15 at 13:59
It depends on which
image
you are building from. Most probably image
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.– illusionist
Jul 20 '15 at 13:59
2
2
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
3
3
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21
|
show 2 more comments
7 Answers
7
active
oldest
votes
login into container with the following command:
docker exec -it <container> bash
Then , run the following command .
apt-get update
apt-get install vim
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
add a comment |
Your container probably haven't installed it out of the box.
Run apt-get install vim
in the terminal and you should be ready to go.
2
Yep, but I prefervim-tiny
(Ubuntu)
– Ben Whaley
Jul 21 '15 at 0:48
20
Don't forget to runapt-get
update first.
– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
add a comment |
The command to run depends on what base image you are using.
For Alpine, vi
is installed as part of the base OS. Installing vim
would be:
apk -U add vim
For Debian and Ubuntu:
apt-get update && apt-get install -y vim
For CentOS, vi
is usually installed with the base OS. For vim
:
yum install -y vim
This should only be done in early development. Once you get a working container, the changes to files should be made to your image or configs stored outside of your container. Update your Dockerfile and other files it uses to build a new image. This certainly shouldn't be done in production since changes inside the container are by design ephemeral and will be lost when the container is replaced.
add a comment |
Add the following line in your Dockerfile then rebuild the docker image.
RUN apt-get update && apt-get install -y vim
add a comment |
Alternatively, keep your docker images small by not installing unnecessary editors. You can edit the files over ssh from the docker host to the container:
vim scp://remoteuser@container-ip//path/to/document
add a comment |
To install within your Docker container you can run command
docker exec apt-get update && apt-get install -y vim
But this will be limited to the container in which vim is installed.
To make it available to all the containers, edit the Dockerfile and add
RUN apt-get update && apt-get install -y vim
or you can also extend the image in the new Dockerfile and add above command. Eg.
FROM < image name >
RUN apt-get update && apt-get install -y vim
add a comment |
Inside container(in docker, not in VM), by default these are not installed.
Even apt-get, wget will not work. My VM is running on Ubuntu 17.10. For me yum package manaager worked.
Yum is not part of debian or ubuntu. It is part of red-hat. But, it works in Ubuntu and it is installed by default like apt-get
Tu install vim, use this command
yum install -y vim-enhanced
To uninstall
yum install -y vim-enhanced
Similarly,
yum install -y wget
yum install -y sudo
-y is for assuming yes if prompted for any qustion asked after doing yum install packagename
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31515863%2fhow-to-run-vi-on-docker-container%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
login into container with the following command:
docker exec -it <container> bash
Then , run the following command .
apt-get update
apt-get install vim
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
add a comment |
login into container with the following command:
docker exec -it <container> bash
Then , run the following command .
apt-get update
apt-get install vim
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
add a comment |
login into container with the following command:
docker exec -it <container> bash
Then , run the following command .
apt-get update
apt-get install vim
login into container with the following command:
docker exec -it <container> bash
Then , run the following command .
apt-get update
apt-get install vim
answered Mar 27 '17 at 9:52
arunprakashpjarunprakashpj
1,1821422
1,1821422
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
add a comment |
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
worked it (Y), Thanks
– Jamsheer
Aug 6 '18 at 10:52
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
Should you encounter permission denied issue while running apt-get, you need to run docker exec as root. "docker exec -u root -it <container> bash". Then apt-get should work.
– java25
Feb 9 at 19:12
add a comment |
Your container probably haven't installed it out of the box.
Run apt-get install vim
in the terminal and you should be ready to go.
2
Yep, but I prefervim-tiny
(Ubuntu)
– Ben Whaley
Jul 21 '15 at 0:48
20
Don't forget to runapt-get
update first.
– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
add a comment |
Your container probably haven't installed it out of the box.
Run apt-get install vim
in the terminal and you should be ready to go.
2
Yep, but I prefervim-tiny
(Ubuntu)
– Ben Whaley
Jul 21 '15 at 0:48
20
Don't forget to runapt-get
update first.
– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
add a comment |
Your container probably haven't installed it out of the box.
Run apt-get install vim
in the terminal and you should be ready to go.
Your container probably haven't installed it out of the box.
Run apt-get install vim
in the terminal and you should be ready to go.
answered Jul 20 '15 at 12:52
EnglundEnglund
889612
889612
2
Yep, but I prefervim-tiny
(Ubuntu)
– Ben Whaley
Jul 21 '15 at 0:48
20
Don't forget to runapt-get
update first.
– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
add a comment |
2
Yep, but I prefervim-tiny
(Ubuntu)
– Ben Whaley
Jul 21 '15 at 0:48
20
Don't forget to runapt-get
update first.
– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
2
2
Yep, but I prefer
vim-tiny
(Ubuntu)– Ben Whaley
Jul 21 '15 at 0:48
Yep, but I prefer
vim-tiny
(Ubuntu)– Ben Whaley
Jul 21 '15 at 0:48
20
20
Don't forget to run
apt-get
update first.– AVProgrammer
Sep 4 '16 at 0:02
Don't forget to run
apt-get
update first.– AVProgrammer
Sep 4 '16 at 0:02
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
Before running 'apt-get install vim', you need to run 'apt-get update'.
– user1521213
Sep 26 '18 at 12:59
add a comment |
The command to run depends on what base image you are using.
For Alpine, vi
is installed as part of the base OS. Installing vim
would be:
apk -U add vim
For Debian and Ubuntu:
apt-get update && apt-get install -y vim
For CentOS, vi
is usually installed with the base OS. For vim
:
yum install -y vim
This should only be done in early development. Once you get a working container, the changes to files should be made to your image or configs stored outside of your container. Update your Dockerfile and other files it uses to build a new image. This certainly shouldn't be done in production since changes inside the container are by design ephemeral and will be lost when the container is replaced.
add a comment |
The command to run depends on what base image you are using.
For Alpine, vi
is installed as part of the base OS. Installing vim
would be:
apk -U add vim
For Debian and Ubuntu:
apt-get update && apt-get install -y vim
For CentOS, vi
is usually installed with the base OS. For vim
:
yum install -y vim
This should only be done in early development. Once you get a working container, the changes to files should be made to your image or configs stored outside of your container. Update your Dockerfile and other files it uses to build a new image. This certainly shouldn't be done in production since changes inside the container are by design ephemeral and will be lost when the container is replaced.
add a comment |
The command to run depends on what base image you are using.
For Alpine, vi
is installed as part of the base OS. Installing vim
would be:
apk -U add vim
For Debian and Ubuntu:
apt-get update && apt-get install -y vim
For CentOS, vi
is usually installed with the base OS. For vim
:
yum install -y vim
This should only be done in early development. Once you get a working container, the changes to files should be made to your image or configs stored outside of your container. Update your Dockerfile and other files it uses to build a new image. This certainly shouldn't be done in production since changes inside the container are by design ephemeral and will be lost when the container is replaced.
The command to run depends on what base image you are using.
For Alpine, vi
is installed as part of the base OS. Installing vim
would be:
apk -U add vim
For Debian and Ubuntu:
apt-get update && apt-get install -y vim
For CentOS, vi
is usually installed with the base OS. For vim
:
yum install -y vim
This should only be done in early development. Once you get a working container, the changes to files should be made to your image or configs stored outside of your container. Update your Dockerfile and other files it uses to build a new image. This certainly shouldn't be done in production since changes inside the container are by design ephemeral and will be lost when the container is replaced.
answered Jan 4 '18 at 14:12
BMitchBMitch
65.6k10142161
65.6k10142161
add a comment |
add a comment |
Add the following line in your Dockerfile then rebuild the docker image.
RUN apt-get update && apt-get install -y vim
add a comment |
Add the following line in your Dockerfile then rebuild the docker image.
RUN apt-get update && apt-get install -y vim
add a comment |
Add the following line in your Dockerfile then rebuild the docker image.
RUN apt-get update && apt-get install -y vim
Add the following line in your Dockerfile then rebuild the docker image.
RUN apt-get update && apt-get install -y vim
edited Jan 24 at 14:41
Brian Tompsett - 汤莱恩
4,2421339102
4,2421339102
answered Jan 24 at 14:12
CJ ChangCJ Chang
313
313
add a comment |
add a comment |
Alternatively, keep your docker images small by not installing unnecessary editors. You can edit the files over ssh from the docker host to the container:
vim scp://remoteuser@container-ip//path/to/document
add a comment |
Alternatively, keep your docker images small by not installing unnecessary editors. You can edit the files over ssh from the docker host to the container:
vim scp://remoteuser@container-ip//path/to/document
add a comment |
Alternatively, keep your docker images small by not installing unnecessary editors. You can edit the files over ssh from the docker host to the container:
vim scp://remoteuser@container-ip//path/to/document
Alternatively, keep your docker images small by not installing unnecessary editors. You can edit the files over ssh from the docker host to the container:
vim scp://remoteuser@container-ip//path/to/document
answered Apr 21 '17 at 17:22
MatthewMatthew
3,66482948
3,66482948
add a comment |
add a comment |
To install within your Docker container you can run command
docker exec apt-get update && apt-get install -y vim
But this will be limited to the container in which vim is installed.
To make it available to all the containers, edit the Dockerfile and add
RUN apt-get update && apt-get install -y vim
or you can also extend the image in the new Dockerfile and add above command. Eg.
FROM < image name >
RUN apt-get update && apt-get install -y vim
add a comment |
To install within your Docker container you can run command
docker exec apt-get update && apt-get install -y vim
But this will be limited to the container in which vim is installed.
To make it available to all the containers, edit the Dockerfile and add
RUN apt-get update && apt-get install -y vim
or you can also extend the image in the new Dockerfile and add above command. Eg.
FROM < image name >
RUN apt-get update && apt-get install -y vim
add a comment |
To install within your Docker container you can run command
docker exec apt-get update && apt-get install -y vim
But this will be limited to the container in which vim is installed.
To make it available to all the containers, edit the Dockerfile and add
RUN apt-get update && apt-get install -y vim
or you can also extend the image in the new Dockerfile and add above command. Eg.
FROM < image name >
RUN apt-get update && apt-get install -y vim
To install within your Docker container you can run command
docker exec apt-get update && apt-get install -y vim
But this will be limited to the container in which vim is installed.
To make it available to all the containers, edit the Dockerfile and add
RUN apt-get update && apt-get install -y vim
or you can also extend the image in the new Dockerfile and add above command. Eg.
FROM < image name >
RUN apt-get update && apt-get install -y vim
answered Jan 5 '18 at 17:37
MB11MB11
144111
144111
add a comment |
add a comment |
Inside container(in docker, not in VM), by default these are not installed.
Even apt-get, wget will not work. My VM is running on Ubuntu 17.10. For me yum package manaager worked.
Yum is not part of debian or ubuntu. It is part of red-hat. But, it works in Ubuntu and it is installed by default like apt-get
Tu install vim, use this command
yum install -y vim-enhanced
To uninstall
yum install -y vim-enhanced
Similarly,
yum install -y wget
yum install -y sudo
-y is for assuming yes if prompted for any qustion asked after doing yum install packagename
add a comment |
Inside container(in docker, not in VM), by default these are not installed.
Even apt-get, wget will not work. My VM is running on Ubuntu 17.10. For me yum package manaager worked.
Yum is not part of debian or ubuntu. It is part of red-hat. But, it works in Ubuntu and it is installed by default like apt-get
Tu install vim, use this command
yum install -y vim-enhanced
To uninstall
yum install -y vim-enhanced
Similarly,
yum install -y wget
yum install -y sudo
-y is for assuming yes if prompted for any qustion asked after doing yum install packagename
add a comment |
Inside container(in docker, not in VM), by default these are not installed.
Even apt-get, wget will not work. My VM is running on Ubuntu 17.10. For me yum package manaager worked.
Yum is not part of debian or ubuntu. It is part of red-hat. But, it works in Ubuntu and it is installed by default like apt-get
Tu install vim, use this command
yum install -y vim-enhanced
To uninstall
yum install -y vim-enhanced
Similarly,
yum install -y wget
yum install -y sudo
-y is for assuming yes if prompted for any qustion asked after doing yum install packagename
Inside container(in docker, not in VM), by default these are not installed.
Even apt-get, wget will not work. My VM is running on Ubuntu 17.10. For me yum package manaager worked.
Yum is not part of debian or ubuntu. It is part of red-hat. But, it works in Ubuntu and it is installed by default like apt-get
Tu install vim, use this command
yum install -y vim-enhanced
To uninstall
yum install -y vim-enhanced
Similarly,
yum install -y wget
yum install -y sudo
-y is for assuming yes if prompted for any qustion asked after doing yum install packagename
answered Mar 8 at 5:08
P Satish PatroP Satish Patro
7310
7310
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31515863%2fhow-to-run-vi-on-docker-container%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
vi may not be installed inside container. Which container have you installed and run?
– Hüseyin BABAL
Jul 20 '15 at 11:57
1
You have to be more specific. Are you trying to run vi inside a container, if so which image is the container based on? In all likelihood you don't have vi installed. (apt-get install vim)
– wpp
Jul 20 '15 at 12:51
It depends on which
image
you are building from. Most probablyimage
you are using is so lighter that it only has things you need to run as an image. You need to manually install packages you need.– illusionist
Jul 20 '15 at 13:59
2
You probably shouldn't be doing config inside a container. Do it in the Dockerfile instead.
– Adrian Mouat
Jul 20 '15 at 14:41
3
Possible duplicate of How to edit file after I shell to a docker container?
– A.B.
Jan 29 '16 at 12:21