Intro
Today I want to share quick manual on how to update Seq instance running in doker, to the latest version.
What is Seq
For those who don’t know, Seq is great server app for collecting log messages. It works well with Serilog which is excelent logging framework from same author. Using these two tools you can log from any application into one place. For example from PowerShell, using another tool, module I wrote – PoShLog which is wrapper of Serilog and PoShLog.Sinks.Seq. See example bellow:
1 2 3 4 5 6 7 8 9 10 11 |
Import-Module PoShLog Import-Module PoShLog.Sinks.Seq New-Logger | Add-SinkSeq -ServerUrl 'http://serverurl:5341' | Start-Logger Write-InfoLog 'Hurrray, my first log message in seq!' # Don't forget to close the logger Close-Logger |
Log message from PowerShell in Seq:
See more information about PoShLog and Seq here – https://github.com/PoShLog/PoShLog.Sinks.Seq
Updating
Anyway, lets move to updating Seq. I suppose you have established ssh conneciton to your server where Seq is hosted.
First let’s see all docker images:
1 |
docker image ls |
Download latest version of seq image:
1 |
docker pull datalust/seq |
Now let’s see our running Seq container:
1 |
docker ps |
Next, stop and remove the existing container using container id
from previous step so we can launch a new one under the same name:
1 2 |
docker stop seq docker rm seq |
In last step we recreate seq container, according to manual, using:
1 2 3 4 5 6 7 8 |
docker run \ --name seq \ -d \ --restart unless-stopped \ -e ACCEPT_EULA=Y \ -v /path/to/seq/data:/data \ -p 5341:80 \ datalust/seq:latest |
Run docker ps
to ensure latest image is running:
And that’s all, Seq is now running it’s latest version. You can verify that in Seq UI, bottom right corner.