You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to restore a .bak into a mssql-server database in a Docker container, and I came across something weird while trying to get it working.
The documentation for setting up mssql-server on Ubuntu often requires the user to restart mssql-server with the following command (I am running this from a shell in my container and it's throwing an error):
$ systemctl restart mssql-server
Failed to connect to bus: No such file or directory
As far as I understand, you cannot run this command inside of a Docker container. The docs suggest using the systemctl command to restart mssql-server, but this cannot work, as systemctl requires systemd, which is not actually running in the image.
What should I do?
The text was updated successfully, but these errors were encountered:
Correct, systemd is not available in containers. SQL Server runs as a process 'sqlservr' in the container. To "restart" SQL Server when it is running in a contain you need to stop and start the container.
Just curious - what were you trying to do which required a restart?
@twright-msft I was trying to restore a .bak file from within my container. I don't remember exactly where I was in that process where I was required to restart. I was editing some config stuff, following along with Microsoft's guide to SQL Server on Ubuntu, and my config changes required a restart to take effect.
I'll go ahead and close the issue, since your answer about systemd satisfies the topic I posted about (for any future troubleshooters trying to figure out how to restart). Thanks!
Hey,
I am trying to restore a
.bak
into amssql-server
database in a Docker container, and I came across something weird while trying to get it working.The documentation for setting up
mssql-server
on Ubuntu often requires the user to restartmssql-server
with the following command (I am running this from a shell in my container and it's throwing an error):As far as I understand, you cannot run this command inside of a Docker container. The docs suggest using the
systemctl
command to restartmssql-server
, but this cannot work, assystemctl
requiressystemd
, which is not actually running in the image.What should I do?
The text was updated successfully, but these errors were encountered: