Skip to content

Viewing container logs

Andrew Pruski edited this page Sep 25, 2020 · 5 revisions

In order to troubleshoot issues or confirm settings the docker command, docker container logs is really useful.

Let's spin up a container: -

docker container run -d `
--publish 15789:1433 `
--env ACCEPT_EULA=Y `
--env SA_PASSWORD=Testing1122 `
--name sqlcontainer1 `
mcr.microsoft.com/mssql/server:2019-CU5-ubuntu-18.04

Run the following to view the logs: -

docker container logs sqlcontainer1

And there's the SQL error log! Really handy when troubleshooting issues.