Run SQL Server in Docker!

  Рет қаралды 49,753

ScriptBytes

ScriptBytes

Жыл бұрын

Learn how to run an instance of SQL Server in a Docker Container.
This is a great way to run and test applications against a local database. Try out all your changes locally before going to dev, test or production!
#docker #sql #programming
Add volumes to persist your data, even if you delete the docker container!
SQL Server Docker Hub page:
hub.docker.com/_/microsoft-ms...
Documentation for volumes and persisting data:
docs.microsoft.com/en-us/sql/...

Пікірлер: 68
@princeonukwili996
@princeonukwili996 Жыл бұрын
Thank you, ive never come across this channel before this is my first time, but from what i seen so far your teaching skills are nice, a short very explanatory video that gave me exactly what i requested for within few minutes . Thanks
@scriptbytes
@scriptbytes Жыл бұрын
I appreciate the kind words. Glad you found it helpful!
@mohammedzyarah
@mohammedzyarah Жыл бұрын
Clear and easy within short time, great stuff, thanks a lot
@scriptbytes
@scriptbytes Жыл бұрын
Thanks for watching!
@ian_y
@ian_y Жыл бұрын
Thanks for this video. I was having a problem configuring the mapped volume. Turns out I needed the "-d" parameter in the "docker run" command to be AFTER the "-v" parameters and not before. Then it worked 👍
@JuiKoloshi
@JuiKoloshi 3 ай бұрын
Deploying to a vps using docker is so differs from classic hosting. Thank you sooooo much for enlightning this things. My gratitude knows no bounds
@scriptbytes
@scriptbytes 3 ай бұрын
You’re welcome. Thanks for watching
@nikolinavukovic8692
@nikolinavukovic8692 Жыл бұрын
Great video, thanks for explaining it so clearly!
@scriptbytes
@scriptbytes Жыл бұрын
Glad it was helpful!
@DutVa
@DutVa 10 ай бұрын
The bit about adding a path to the local folders to make sure the data isn't wiped when the container is removed was invaluable - this helped me get mssql running on Synology NAS
@scriptbytes
@scriptbytes 10 ай бұрын
That’s an interesting way of doing it. Does that mean you’re only putting the data on the NAS, or are you somehow running docker/sql on there as well? How’s the performance?
@abdulsiyadnp
@abdulsiyadnp Жыл бұрын
Thankyou very much, especially the mentioning about Azure Data Studio, amazing stuff. Looking for a long time, for a clean, elegant tool.
@scriptbytes
@scriptbytes Жыл бұрын
Yea it’s a great light weight tool for the day to day stuff. Thanks for watching!
@felipecapelli2665
@felipecapelli2665 14 күн бұрын
Helped me a lot :) Thank you so much =D
@danielschoedel4232
@danielschoedel4232 5 ай бұрын
Great video. I learned a lot about using containers and how the interact with SQL. thanks
@scriptbytes
@scriptbytes 5 ай бұрын
Glad you enjoyed it!
@hz7qnf
@hz7qnf Жыл бұрын
Great tutorial in setting up and persisting sql server DBs locally. Will use that for development rather than using Azure Sql Servers to save a little money before publishing. Much thanks.
@scriptbytes
@scriptbytes Жыл бұрын
Ya it’s a great way to save some money during development. Thanks for watching!
@ali_kara
@ali_kara 11 ай бұрын
Thanks for clear and useful informations :)
@scriptbytes
@scriptbytes 11 ай бұрын
You’re welcome
@andelsonnicolaslopezysabel2501
@andelsonnicolaslopezysabel2501 8 ай бұрын
Thanks for the video, really helpful
@scriptbytes
@scriptbytes 8 ай бұрын
You’re welcome, thanks for watching!
@knotprasertsimla3969
@knotprasertsimla3969 20 күн бұрын
Thank you❤❤
@razblack
@razblack Жыл бұрын
pretty cool, didn't even think about mapping storage to persist the data :D now, to elevate this... it would be great to utilize my visual studio database projects in the container build.. somehow.
@scriptbytes
@scriptbytes Жыл бұрын
I’m glad you found it helpful!
@joeyvico
@joeyvico Жыл бұрын
Nice and easy, thanks
@scriptbytes
@scriptbytes Жыл бұрын
You’re welcome!
@HamedDev
@HamedDev Ай бұрын
You are greate
@olafschermann1592
@olafschermann1592 Жыл бұрын
Thank you for Azure Data Studio - didn’t know that…
@osr2004snd
@osr2004snd Ай бұрын
Would be nice another video describing how to use certificates to access sql server on docker (Linux)
@shivaniKadali
@shivaniKadali 3 ай бұрын
explination is good, after creating the containers without using volumes when i created the table and delete the container but the data is still persisting. i followed the same process can anyone suggest me the solution for this whats the reason for this.
@hasanmougharbel8030
@hasanmougharbel8030 Жыл бұрын
Hey there, Kudos to your great efforts in this channel. I am a new sql learner with simple enquiry. Could i install on my pc only sql server management studio without an sql server? The reason that our company has a dedicated server machine, so would i need only to install the sql studio to access the server? Thanks for taking care of my enquiry.
@scriptbytes
@scriptbytes Жыл бұрын
Hello, thanks for watching! Yes, you can install SQL Server Management Studio (SSMS) on your pc without installing SQL Server, and that will also allow you to connect to your companies SQL Server. If you google "SSMS Download" one of the first results should be the download page from Microsoft. It is a free download.
@sonthai5990
@sonthai5990 2 ай бұрын
Excellent instruction but how i can limit ram and memory usage in image . It alway use 70-80% ram ( i have 16gb ) . only find instruction for macos and linux
@infinite_s902
@infinite_s902 2 ай бұрын
Don’t forget about post number , [port] after server name and also to trust the certificate
@davinpolchow7095
@davinpolchow7095 Жыл бұрын
I'm struggling with the initial setup. docker pull command for 2022 worked initially but on the second step of adding a password I received an error: "docker run requires at least 1 argument" now all of my input returns "command not found"
@scriptbytes
@scriptbytes Жыл бұрын
The error "docker run requires at least 1 argument" generally means you forgot the image name, or options are not where the should be.
@anishapatnaik9978
@anishapatnaik9978 11 ай бұрын
Hi your videos are really informative. I have downloaded the azure studio and docker. But I am unable to connect server any advice?
@scriptbytes
@scriptbytes 11 ай бұрын
Is it giving an error/message?
@jaapdunnebier4384
@jaapdunnebier4384 Жыл бұрын
Hi, Would you run a mssqlserver in a docker on Google Cloud Run (GCR) and in that case where would your create the external mdf/ldf volumes ? And is Google allowing that ?
@scriptbytes
@scriptbytes Жыл бұрын
No, Cloud Run doesn’t have a persistent disk so there’s no way (that I know of) to hook it up. You’d want to use Cloud Sql, a vm on Compute Engine, or kubernetes.
@jaapdunnebier4384
@jaapdunnebier4384 Жыл бұрын
@@scriptbytes Thanks again!
@christopherjspiteri
@christopherjspiteri Жыл бұрын
I agree with most - video is cleary, is a good video, BUT I can't get it to work. I have tried it in powershell, CMD, and BASH. I am working on a mac with docker desktop. if you have any suggestions please help. I can't get past the connecting to the server part at around 2:00
@scriptbytes
@scriptbytes Жыл бұрын
It's tough to tell what it might be, but I would check a few things: 1. If you're on an M1/M2 mac you'll need to use a SQL Edge docker image instead of SQL Server because there's no ARM version of SQL Server. 2. Make sure your password is "strong" enough. SQL I think enforces password strength by default. 3. Maybe try 127.0.0.1 instead of localhost for connecting? I recently got an M1 Macbook, and I've had a few people say they're having issues following this video on their Macs, so maybe I'll do a quick video in the next week or so on doing the same thing from a mac.
@h2o620
@h2o620 3 ай бұрын
Hi, I hope you could help me, I have been searching for hours how to get SQL and I came across your video. When doing the server connection, i got an error but it said something along the lines that i could still go ahead by pressing a blue button so i did and connection it looks fine, any advice should i have not done that? Next, the connection was succesful is the data base stage necessary or is SQL now downloaded and ready? (im a total noob trying to get into data sorry if its a dumb question)
@scriptbytes
@scriptbytes 3 ай бұрын
It's tough to tell what the error might have been. It may have been asking to accept/approve the secure connection?
@prodrigu75
@prodrigu75 10 ай бұрын
With this sql image can I run an Integration Services (SSIS) ETL?
@scriptbytes
@scriptbytes 10 ай бұрын
Good question. I'm not actually sure, I don't use SSIS much. Hopefully someone can chime in and help you out!
@garychen505
@garychen505 Жыл бұрын
Running the docker command in window with -v, docker container will stop working after few seconds. I have to remove the -v but the data is not persisted.
@scriptbytes
@scriptbytes Жыл бұрын
Hard to tell what it might be. In Docker Desktop, after the container has run and stopped, you can click on the container and then check the logs tab at the top, there might be details in there about what is making it stop right away. If I had to guess, it's either: 1. the password isn't strong enough because I think MSSQL enforces password requirements (capital letter, number, symbol, etc.) 2. Docker doesn't have permissions to write to the folder you gave it. 3. The path doesn't exist Hope you get it working!!
@cargouvu
@cargouvu 7 ай бұрын
I am having issues installing SSMS on my computer. Does install SQL Server this way with Docker/ADF install all the dependencies to run SSMS without anything preinstalled?
@scriptbytes
@scriptbytes 7 ай бұрын
No, SSMS is a separate install if you want to use that to connect/query your database.
@abulaith4485
@abulaith4485 6 ай бұрын
Great Video. The SQL container image from microsoft contains SQL Express version. How would run a container with a Full SQL server version for a large corporate application? Thank you
@scriptbytes
@scriptbytes 6 ай бұрын
The container has all the versions, there is another option you can pass in that tells it which to use: -e "MSSQL_PID= Standard". PID stands for Product ID. There is also an option for Enterprise.
@abulaith4485
@abulaith4485 6 ай бұрын
Great, many thanks
@cezaryyson5736
@cezaryyson5736 Жыл бұрын
anyone can tell how to join this sqlserver to Active Directory, and enable AD auth for users?
@scriptbytes
@scriptbytes Жыл бұрын
Unfortunately I don't have any experience connecting a SQL Server to AD. Hopefully someone else can chime in to help you out!
@johnnyboy2000
@johnnyboy2000 3 ай бұрын
OK Great Job! 👍👍 - need to go ahead and make a .NET Core Web App to put in a container now.....
@theyuhtahn6207
@theyuhtahn6207 Жыл бұрын
i dont know why but now i see the title source Microsoft not blue and title change to Microsoft SQL Server - Ubuntu based images and i cant make it work on my m1pro work, can u make new one to help me, or give me some advice
@scriptbytes
@scriptbytes Жыл бұрын
The SQL Server image won't work on Apple Silicon chips because there's no ARM version. However you can use SQL Edge (hub.docker.com/_/microsoft-azure-sql-edge), it works on M1 macs.
@theyuhtahn6207
@theyuhtahn6207 Жыл бұрын
@@scriptbytes i had made mssql(docker) work on my mac before, but after i ease my mac, then i down new version of docker and i do fl any video on utube and til now it didnt work
@theyuhtahn6207
@theyuhtahn6207 Жыл бұрын
@@scriptbytes i see status exited(1) after i run commandline docker.. on terminal. Failed to read packet: EOF (docker)
@cerioscha
@cerioscha Жыл бұрын
@@scriptbytes Thanks, works for me on a M1 pro
@Sneaadler
@Sneaadler 3 ай бұрын
For something that is suppost to stop the age old problem: "but it works on my computer". This deos not work on my computer
@scriptbytes
@scriptbytes 3 ай бұрын
Any specific errors or issues?
@damarh
@damarh 2 ай бұрын
... Now show us how to license it to run production workload 😏
@scriptbytes
@scriptbytes 2 ай бұрын
There’s another environment variable for that: MSSQL_PID Pass it your product id and you should be set learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017#environment-variables
How to run SQL server in a Docker container
17:26
LogRocket
Рет қаралды 67 М.
How to Set Up MySQL Database with Docker
10:14
Database Star
Рет қаралды 188 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 77 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 2,5 МЛН
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
you need to learn Docker RIGHT NOW!! // Docker Containers 101
23:19
NetworkChuck
Рет қаралды 2,6 МЛН
Run SQL Server on M1/M2 Macbook
10:46
ScriptBytes
Рет қаралды 29 М.
Docker Networking Tutorial, ALL Network Types explained!
19:46
Christian Lempa
Рет қаралды 190 М.
.NET Docker Tutorial - SQL Server Docker [.NET Docker]
20:19
Coding Droplets
Рет қаралды 50 М.
How Do Version Control Systems Really Work?
14:51
Eduonix Learning Solutions
Рет қаралды 4,8 М.
.Net 8 API Role Based Authorization
9:15
ScriptBytes
Рет қаралды 3,3 М.
Docker Compose with .NET Core & SQL Server (Step by Step)
1:08:15
Les Jackson
Рет қаралды 102 М.
How to Run MongoDB in Docker
11:44
ScriptBytes
Рет қаралды 15 М.