Setting the Container Name–#SQLNewBlogger

I had started a Stairway series on containers (which I need to get back to), and I got a question. How do we set the name of a container?

If I just start a new container with a generic, minimal command, I get a random name. As an example, I’d run something like this:

docker run -p 51433:1433 -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Demo12#4" -v C:\Docker\SQL:/sql -d mcr.microsoft.com/mssql/server:2019-latest

Now if I look at the list of containers, what I see is this container running under the name, “”. Not a huge problem, but when you have a lot of containers, this isn’t ideal. If you look below, this container is the first one in my list:

2022-03-30 08_54_13-cmd

However, the first name is listed as crazy_mirzakhani, not something I chose. I broke the image because it’s so wide.

2022-03-30 08_54_29-cmd

Let me now start a new container, same image, but with a name. I do this by adding the –name parameter with a value.

docker run --name dockernamedemo -p 52433:1433 -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Demo12#4" -v C:\Docker\SQL:/sql -d mcr.microsoft.com/mssql/server:2019-latest

Now if I look at the container list, I see this:

2022-03-30 08_58_47-cmd

And the names:

2022-03-30 08_58_51-cmd

This is useful to help me keep track of the containers I’ve got running.

This doesn’t address naming standards, which I might look at as something else that can be complex. I tend to use SQLxxxx where xxxx is the version. If I need multiple ones, I tend to use SQL2019, SQL2019_2, SQL2019_3, etc. Not the best way to do things, but since I match up ports, this is easy for connections. SQL2019 is 51433. SQL2019_2 is 52433, etc.

SQL New Blogger

When I saw the question, it was a couple minutes to find a reference and give an answer. I decided to take 10 more minutes and just write this post, publishing a short reference on how to name a container.

I added a short bit at the end on naming standards, which might be a good thing for you to write on as well.

Posted in Blog | Tagged , | Comments Off on Setting the Container Name–#SQLNewBlogger

Daily Coping 11 Apr 2022

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

Today’s tip is to commit to being more active this week.

I tend to exercise regularly, though I’ve become less concerned if I miss a day or two than I was in the past. I’m a big fan of small steps, and rather than make this a month goal, let’s try making it a week goal.

I’m writing this in advance, so I’m noting this particular tip the week before and I’m starting on Tuesday, 5 Apr, to get through the week. Here’s my commitment, and I’ll try to update this once the post publishes:

Updates with my effort over the week.

  • 5 Apr – yoga, class scheduled for this evening – DONE
  • 6 Apr – weight lifting – I have morning meetings, but then I’ll go to the gym. – DONE
  • 7 Apr – possibly skiing, trying to decide if I can get away. If not, I’ll likely try to swim – DONE – Cardio class with my wife
  • 8 Apr – Yoga, scheduled – DONE
  • 9 Apr – Saturday, and I’ll aim to bike and lift, legs today – Done–  yardwork and legs at the gym
  • 10 Apr – Coaching all day, which makes things tough. I am hoping to find 20 minutes either early in the am or late in the day for a light yoga session on YouTube. – FAIL – nothing. coached from 7am-430p, drove home, had dinner, lay down
  • 11 Apr – Back to yoga class, hopefully a hard one – Done – scheduled for this afternoon

This isn’t far from a normal week, but if I can get something in on the 10th, I’ll make my goal.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 11 Apr 2022

The Backlog

Software development is complex these days. Maybe it’s always been complex, but the shorter timelines and greater vision of what is currently happening in development teams mean that we can see a lot is going on at any particular time. Really, once you get beyond a handful of developers, the coding changes look like a chaotic ballet that may (or may not) be in sync across developers. Modern work tracking tools make this easier, and for any particular developer, it isn’t too hard to look at a Kanban board linked to a git repository and track the changes that have taken place.

There is always more work to tackle than can be done at the current moment, so it is important to add new tasks to a backlog. Building those, and tracking what is needed, is a bit of an art. What do you write down, how much detail, and what level of effort is needed. Paul Andrew wrote a good post on what makes a good backlog story, using an example from his work. He looks at the need for infrastructure in this case, but that would be a common request these days when DevOps and the cloud require some blurring of the line between code and the resources it runs on.

I like the completeness of this request, and I do think this level of detail is important, with the inclusion of criteria to measure the work and test that it is done. I just don’t know if this is required when we add the work to a backlog. The rapid changes in our software, as we adapt and work with customers’ feedback, mean that we might get many more ideas (or issues) than we ever build. In fact, some requests/suggestions/desires that get sent to developers or project managers might be no longer needed or forgotten by the time they reach the coding stage. I know I’ve certainly requested some features at SQL Server Central that I later decide aren’t important or needed.

My view is that ideas ought to be captured, and triage ought to include enough detail to estimate how important and hard the work may be. Once we get to the point of actually performing work, then we need to flesh out details on what constitutes done and what tests can verify this. For very small levels of work, this might be just a few light tests, but even noting that a new column is in a table and associated stored procedures can help developers remember to check for dependencies and avoid simple mistakes.

Building software and managing the process across a team and over time is hard. It is easy to lose control, and it can be hard to make decisions about what to build and what to defer. A backlog is critical, and managing that backlog with regular review and attention to detail is important. However, just as we don’t necessarily want to prematurely optimize code, I also don’t know that we need to build out the complete story when someone has a request. Grow your stories as you grow you code with an agile approach over time.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged | 1 Comment

Daily Coping 8 Apr 2022

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

Today’s tip is to think of two people you know for the next 10 seconds, and think to yourself “I wish for that person to be happy.”

TJay Belt posted this recently and I thought it was a nice coping tip in life for me.

So, I sent my wishes out for 10 seconds to TJay and my nephew to be happy. TJay has a great life, and I see him smile often, so might not have needed this, but he certainly makes me smile.

My newphew is in a gap year after high school, working, doing some traveling, and I wish that he is happy and enjoying his life.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 8 Apr 2022