Automating installation of Docker & SQL command line tools on Linux

I’ve been getting to grips with Docker SQL Containers on Linux (specifically Ubuntu 16.04) and have found that I’ve been running the same commands over and over when I’m configuring a new server.

The old adage goes that if you run anything more than once it should be automated, right?

So I’ve created a repository on GitHub that pulls together the code from Docker to install the Community Edition and the code from Microsoft to install the SQL command line tools.

The steps it performs are: –

  • Installs the Docker Community Edition
  • Installs the SQL Server command line tools
  • Pulls the latest SQL Server on Linux image from the Docker Hub

To run this yourself, first clone a copy of the repository onto the server: –

git clone https://github.com/dbafromthecold/InstallDockerOnUbuntu.git

Then navigate to the directory: –

cd InstallDockerOnUbuntu

Make the script executable: –

chmod +x installdocker.sh

Then run the script!

./installdocker.sh

N.B. – This is setup for Ubuntu 16.04 so it will not work on other distros

Contact me @dbafromthecold on twitter or email dbafromthecold@gmail.com if you have any issues or have any improvements to the script 🙂

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s