I am running docker on a Virtual Machine on an Amazon AWS EC2 instance and I want to edit one file (application.properties) which lies in the following directory:
root@e2afc27e858e:/score-client/conf/applications.proteries
The docker image does not seem to contain vim/vi, nano or emacs. That’s why I should edit the file with "sed".
In particular, in the application.properties file is a line called:
accessToken=
But I want to edit the file so that it says:
accessToken=abcd123
How do I edit the file in docker with SED?
2
Answers
Given the following
application.properties
example filethe following
sed
command:gives as a result (i.e.
cat application.properties
)