Run SQL Server in Docker!

Поделиться
HTML-код
  • Опубликовано: 12 авг 2022
  • 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/...

Комментарии • 66

  • @JuiKoloshi
    @JuiKoloshi 2 месяца назад +1

    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  2 месяца назад

      You’re welcome. Thanks for watching

  • @princeonukwili996
    @princeonukwili996 Год назад +9

    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!

  • @osr2004snd
    @osr2004snd 11 дней назад +1

    Would be nice another video describing how to use certificates to access sql server on docker (Linux)

  • @mohammedzyarah
    @mohammedzyarah Год назад +3

    Clear and easy within short time, great stuff, thanks a lot

  • @DutVa
    @DutVa 9 месяцев назад +1

    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  9 месяцев назад +1

      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?

  • @ian_y
    @ian_y Год назад +1

    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 👍

  • @nikolinavukovic8692
    @nikolinavukovic8692 Год назад +3

    Great video, thanks for explaining it so clearly!

  • @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!

  • @danielschoedel4232
    @danielschoedel4232 4 месяца назад

    Great video. I learned a lot about using containers and how the interact with SQL. thanks

  • @ali_kara
    @ali_kara 9 месяцев назад

    Thanks for clear and useful informations :)

  • @andelsonnicolaslopezysabel2501
    @andelsonnicolaslopezysabel2501 7 месяцев назад

    Thanks for the video, really helpful

    • @scriptbytes
      @scriptbytes  6 месяцев назад +1

      You’re welcome, thanks for watching!

  • @hz7qnf
    @hz7qnf Год назад +1

    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!

  • @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!

  • @infinite_s902
    @infinite_s902 25 дней назад

    Don’t forget about post number , [port] after server name and also to trust the certificate

  • @olafschermann1592
    @olafschermann1592 Год назад +1

    Thank you for Azure Data Studio - didn’t know that…

  • @joeyvico
    @joeyvico Год назад

    Nice and easy, thanks

  • @HamedDev
    @HamedDev 13 дней назад

    You are greate

  • @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  Год назад +2

      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.

  • @shivaniKadali
    @shivaniKadali Месяц назад

    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.

  • @sonthai5990
    @sonthai5990 24 дня назад

    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

  • @johnnyboy2000
    @johnnyboy2000 2 месяца назад

    OK Great Job! 👍👍 - need to go ahead and make a .NET Core Web App to put in a container now.....

  • @davinpolchow7095
    @davinpolchow7095 11 месяцев назад

    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  11 месяцев назад

      The error "docker run requires at least 1 argument" generally means you forgot the image name, or options are not where the should be.

  • @h2o620
    @h2o620 2 месяца назад

    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  2 месяца назад

      It's tough to tell what the error might have been. It may have been asking to accept/approve the secure connection?

  • @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  Год назад +1

      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!

  • @anishapatnaik9978
    @anishapatnaik9978 9 месяцев назад

    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  9 месяцев назад

      Is it giving an error/message?

  • @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.

  • @cargouvu
    @cargouvu 6 месяцев назад

    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  6 месяцев назад

      No, SSMS is a separate install if you want to use that to connect/query your database.

  • @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!!

  • @abulaith4485
    @abulaith4485 5 месяцев назад

    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  5 месяцев назад +1

      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 5 месяцев назад

      Great, many thanks

  • @prodrigu75
    @prodrigu75 8 месяцев назад

    With this sql image can I run an Integration Services (SSIS) ETL?

    • @scriptbytes
      @scriptbytes  8 месяцев назад

      Good question. I'm not actually sure, I don't use SSIS much. Hopefully someone can chime in and help you out!

  • @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!

  • @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  Год назад +2

      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 Месяц назад

    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  Месяц назад

      Any specific errors or issues?

  • @damarh
    @damarh 16 дней назад

    ... Now show us how to license it to run production workload 😏

    • @scriptbytes
      @scriptbytes  16 дней назад

      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