I’m new to Docker and I’m using this Microsoft SQL Server Docker Image
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
I’ve run the container on my linux server with this command which is from the microsoft doc:
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>"
-p 1433:1433 --name sql1 --hostname sql1
-d mcr.microsoft.com/mssql/server:2019-latest
I can connect with ssh when I’m on my server with this command:
sudo docker exec -it sql1 "bash"
My problem is that I can’t figure out how I can connect to this container with FTP.
I thought installing ftp on the image and then run with something like:
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>"
-p 1433:1433 -p 21:21 --name sql1 --hostname sql1
-d mcr.microsoft.com/mssql/server:2019-latest
But I can’t run it again without removing the image.
I Would be glad if someone could help me.
2
Answers
I did not found a way to get an FTP Access but the main purpose was to be able to move a file from the host into the container.
The way to do that is as simple as a ssh cp
Thanks for the answers
You are not editing the image but the container that you create with that command.
Just run that command to create your container and use that container via
and
and if you want to have an image of your container after you edited your Container, use the
or so. (You might read the documentation on docker commit for correct syntax.)
UPDATE:
As of the comments below, I’d like to recommend you to get yourself confident with the docker file usage instead of docker commit.