Build Failed - ERROR [internal] load metadata for docker.io/microsoft/mssql-server-linux:2017-latest

When I try to run docker build I get this error…

 => ERROR [internal] load metadata for docker.io/microsoft/mssql-server-linux:2017-latest                                                                                                                                          
------
 > [internal] load metadata for docker.io/microsoft/mssql-server-linux:2017-latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
ERROR: Service 'database' failed to build : Build failed

I logged out/in of docker to confirm authorization / I checked and confirmed ‘mssql-server-linux:2017-latest’ was running. Not sure what else I need to do? This was working until recent docker update.

Any advice is welcome.

What do you mean exactly with “was running”?

Also, why do you think microsoft/mssql-server-linux exists on Docker Hub? It seems it does not.

(Maybe you want https://hub.docker.com/_/microsoft-mssql-server?)

Hi Arjan, thanks for responding,

Please forgive my ignorance as I’m out of my element. I’m trying to get my virtual environment running again after a recent docker update and there seems to be some changes as this used to work ok. The developer that set this up had used - FROM microsoft/mssql-server-linux:2017-latest in the build > db > Dockerfile.

For some reason this used to work ~ regardless, I changed as per your suggestion to FROM mcr.microsoft.com/mssql/server:2017-latest and this at least successfully started the server and continued the build. Unfortunately though it looks like the process is at a stand still as I have been looking at this message for a while now and it does not seem to finish the build.

database_1 | 2021-07-19 16:05:49.43 spid53 Using 'dbghelp.dll' version '4.0.5' 2021-07-19 16:07:31.46 spid53 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required. 2021-07-19 16:07:31.53 spid53 Using 'xplog70.dll' version '2017.140.3401' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.


I even rolled back docker to 2.5 and this still gets hung up on this same message.

Do you know what may have changed to break this build process or how I might be able to work around it?

You may want to read the January 2019 Improved discovery experience for Microsoft containers on Docker Hub which states:

Starting in May 2018, a small selection of images was migrated from microsoft/* to mcr.microsoft.com/*. We now have most of the images moved to mcr.microsoft.com while still maintaining the discovery experience on Docker Hub. The transition is still in progress and we hope to have 100% of the repos moved to MCR within the next few months.

And also, back in January 2019, a promise was made:

Maintaining our commitment to support all existing and new customers, all the currently supported image tags pulled from Docker Hub will continue to work. Whether you’ve deployed the image as docker pull microsoft/* or referenced the image in a Dockerfile FROM statement, if the tag was pulled from Docker Hub, it will continue to work. This is true for the latest tag as well.

I’ve not read the full blog post. And the Microsoft ecosystem is not my strong suit, so I may be very wrong about expecting search results for microsoft/mssql-server-linux given the previous FROM microsoft/mssql-server-linux:2017-latest, if that early 2019 promise still holds true.

Anyway, I now assume it existed when you first pulled the image (maybe dating back to 2017?), and was cached locally ever since. And maybe somehow the local cache was wiped during the Docker update? (If things still work on another machine, you may be able to tag the cached image for your own repository, like docker tag microsoft/mssql-server-linux:2017-latest your-repo/mssql-server-linux:2017-latest, push that from that machine, and pull it from your own machine. But I also assume you should be able to find the correct up-to-date name and adjust the FROM for that.)

The .dll part sounds like a Windows version to me, not a Linux version. But I already explained Microsoft images are not my strong suit, so I may be wrong. The original microsoft/mssql-server-linux surely sounds like a Linux version to me.

So: are you expecting Windows or Linux images, and is your Docker setup using Windows containers or Linux containers? (And: are you sure that did not change during your recent Docker update? docker info may reveal more, I think.)

By the way, on a Mac (running Linux containers), the following works for me:

docker run --rm -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest
Click for full log
docker run --rm -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest
SQL Server 2019 will run as non-root by default.
This container is running as user root.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
2021-07-19 17:12:17.05 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2021-07-19 17:12:17.32 Server      Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2021-07-19 17:12:17.34 Server      Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2021-07-19 17:12:17.37 Server      Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2021-07-19 17:12:17.52 Server      Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2021-07-19 17:12:17.66 Server      Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2021-07-19 17:12:17.73 Server      Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2021-07-19 17:12:17.86 Server      Microsoft SQL Server 2017 (RTM-CU25) (KB5003830) - 14.0.3401.7 (X64) 
	Jun 25 2021 14:02:48 
	Copyright (C) 2017 Microsoft Corporation
	Developer Edition (64-bit) on Linux (Ubuntu 16.04.7 LTS)
2021-07-19 17:12:17.92 Server      UTC adjustment: 0:00
2021-07-19 17:12:17.93 Server      (c) Microsoft Corporation.
2021-07-19 17:12:17.93 Server      All rights reserved.
2021-07-19 17:12:17.94 Server      Server process ID is 340.
2021-07-19 17:12:17.94 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2021-07-19 17:12:17.95 Server      Registry startup parameters: 
	 -d /var/opt/mssql/data/master.mdf
	 -l /var/opt/mssql/data/mastlog.ldf
	 -e /var/opt/mssql/log/errorlog
2021-07-19 17:12:17.96 Server      SQL Server detected 2 sockets with 1 cores per socket and 1 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2021-07-19 17:12:18.00 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2021-07-19 17:12:18.02 Server      Detected 1591 MB of RAM. This is an informational message; no user action is required.
2021-07-19 17:12:18.04 Server      Using conventional memory in the memory manager.
2021-07-19 17:12:18.05 Server      Page exclusion bitmap is enabled.
2021-07-19 17:12:18.17 Server      Buffer pool extension is already disabled. No action is necessary. 
2021-07-19 17:12:18.46 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2021-07-19 17:12:18.48 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2021-07-19 17:12:18.50 Server      Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2021-07-19 17:12:18.60 Server      Query Store settings initialized with enabled = 1, 
2021-07-19 17:12:18.65 Server      The maximum number of dedicated administrator connections for this instance is '1'
2021-07-19 17:12:18.66 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2021-07-19 17:12:18.70 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2021-07-19 17:12:18.73 Server      In-Memory OLTP initialized on lowend machine.
2021-07-19 17:12:18.83 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance. 
2021-07-19 17:12:18.89 Server      Software Usage Metrics is disabled.
2021-07-19 17:12:18.91 spid6s      Starting up database 'master'.
ForceFlush feature is enabled for log durability.
2021-07-19 17:12:18.99 spid6s      The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes.  3072 bytes at offset 418816 in file /var/opt/mssql/data/mastlog.ldf will be written.
2021-07-19 17:12:19.35 spid6s      Converting database 'master' from version 862 to the current version 869.
2021-07-19 17:12:19.38 spid6s      Database 'master' running the upgrade step from version 862 to version 863.
2021-07-19 17:12:19.45 spid6s      Database 'master' running the upgrade step from version 863 to version 864.
2021-07-19 17:12:19.53 spid6s      Database 'master' running the upgrade step from version 864 to version 865.
2021-07-19 17:12:19.64 spid6s      Database 'master' running the upgrade step from version 865 to version 866.
2021-07-19 17:12:19.69 spid6s      Database 'master' running the upgrade step from version 866 to version 867.
2021-07-19 17:12:19.74 spid6s      Database 'master' running the upgrade step from version 867 to version 868.
2021-07-19 17:12:19.79 spid6s      Database 'master' running the upgrade step from version 868 to version 869.
2021-07-19 17:12:20.10 spid6s      Resource governor reconfiguration succeeded.
2021-07-19 17:12:20.13 spid6s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2021-07-19 17:12:20.17 spid6s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2021-07-19 17:12:20.41 spid6s      SQL Trace ID 1 was started by login "sa".
2021-07-19 17:12:20.57 spid6s      Server name is '6bf2846fab0b'. This is an informational message only. No user action is required.
2021-07-19 17:12:20.61 spid18s     Password policy update was successful.
2021-07-19 17:12:20.74 spid20s     Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2021-07-19 17:12:20.76 spid6s      Starting up database 'msdb'.
2021-07-19 17:12:20.78 spid11s     Starting up database 'mssqlsystemresource'.
2021-07-19 17:12:20.92 spid20s     Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2021-07-19 17:12:21.05 spid11s     The resource database build version is 14.00.3401. This is an informational message only. No user action is required.
2021-07-19 17:12:21.32 spid11s     Starting up database 'model'.
2021-07-19 17:12:21.39 spid6s      The tail of the log for database msdb is being rewritten to match the new sector size of 4096 bytes.  512 bytes at offset 306688 in file /var/opt/mssql/data/MSDBLog.ldf will be written.
2021-07-19 17:12:21.57 spid11s     The tail of the log for database model is being rewritten to match the new sector size of 4096 bytes.  2048 bytes at offset 75776 in file /var/opt/mssql/data/modellog.ldf will be written.
2021-07-19 17:12:21.62 spid6s      Converting database 'msdb' from version 862 to the current version 869.
2021-07-19 17:12:21.71 spid6s      Database 'msdb' running the upgrade step from version 862 to version 863.
2021-07-19 17:12:21.80 spid11s     Converting database 'model' from version 862 to the current version 869.
2021-07-19 17:12:21.92 spid11s     Database 'model' running the upgrade step from version 862 to version 863.
2021-07-19 17:12:22.18 spid6s      Database 'msdb' running the upgrade step from version 863 to version 864.
2021-07-19 17:12:22.21 spid11s     Database 'model' running the upgrade step from version 863 to version 864.
2021-07-19 17:12:22.42 spid6s      Database 'msdb' running the upgrade step from version 864 to version 865.
2021-07-19 17:12:22.47 spid11s     Database 'model' running the upgrade step from version 864 to version 865.
2021-07-19 17:12:22.50 spid6s      Database 'msdb' running the upgrade step from version 865 to version 866.
2021-07-19 17:12:22.62 spid11s     Database 'model' running the upgrade step from version 865 to version 866.
2021-07-19 17:12:22.68 spid6s      Database 'msdb' running the upgrade step from version 866 to version 867.
2021-07-19 17:12:22.76 spid11s     Database 'model' running the upgrade step from version 866 to version 867.
2021-07-19 17:12:22.79 spid6s      Database 'msdb' running the upgrade step from version 867 to version 868.
2021-07-19 17:12:22.79 spid11s     Database 'model' running the upgrade step from version 867 to version 868.
2021-07-19 17:12:22.91 spid6s      Database 'msdb' running the upgrade step from version 868 to version 869.
2021-07-19 17:12:22.95 spid11s     Database 'model' running the upgrade step from version 868 to version 869.
2021-07-19 17:12:23.10 spid11s     Polybase feature disabled.
2021-07-19 17:12:23.11 spid11s     Clearing tempdb database.
2021-07-19 17:12:23.19 spid18s     A self-generated certificate was successfully loaded for encryption.
2021-07-19 17:12:23.21 spid18s     Server is listening on [ 'any' <ipv6> 1433].
2021-07-19 17:12:23.22 spid18s     Server is listening on [ 'any' <ipv4> 1433].
2021-07-19 17:12:23.25 Server      Server is listening on [ ::1 <ipv6> 1434].
2021-07-19 17:12:23.30 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434].
2021-07-19 17:12:23.31 Server      Dedicated admin connection support was established for listening locally on port 1434.
2021-07-19 17:12:23.34 spid18s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
2021-07-19 17:12:23.41 spid11s     Starting up database 'tempdb'.
2021-07-19 17:12:23.52 spid11s     The tempdb database has 1 data file(s).
2021-07-19 17:12:23.55 spid24s     The Service Broker endpoint is in disabled or stopped state.
2021-07-19 17:12:23.57 spid24s     The Database Mirroring endpoint is in disabled or stopped state.
2021-07-19 17:12:23.62 spid24s     Service Broker manager has started.
2021-07-19 17:12:23.67 spid6s      Recovery is complete. This is an informational message only. No user action is required.
2021-07-19 17:12:23.70 spid20s     The default language (LCID 0) has been set for engine and full-text services.

The logs do not mention any .dll for me.

Great info Arjan!

I will definitely review and try your sugestions.

I’m not sure what I’m expecting except to see the site in emulation - I do know the live site runs on a IIS if that tells you anything. I’m also running docker on a MAC OS platform ~ so I will definetly give your terminal command a try to see if that jogs anything.

There has been “some” all be it very small progress on the build messages since posting.

cfml_1      | [INFO ] runwar.context: Jul 19, 2021 17:09:24 PM Information [scheduler-2] - Run Client Storage Purge

I could force quit docker and run your terminal commands to see if that helps. This seems to be taking forever and it was much quicker process the last time.

This does not support Windows containers (only Windows can run those), so you’d be expecting Linux images. (Which Microsoft surely provides, as the docker run command above runs fine on my Mac.)

Happy to report I finally got my DEV environment running and in the end it turned out to be an issue with the coldfusion image and not the MSSQL image. Thanks again for the help.