Swag and linuxserver/mods:swag-dashboard &swag-dbip

Lately when bringing up swag with the two linuxserver mods its seems to get stuck from what I can tell to download and apply?

See below the part it gets stuck in. Any suggestions?
Can these mods be hosted locally on my host instead of downloading them every time swag starts?



swag | [mod-init] Applying linuxserver/mods:swag-dashboard files to container swag | [mod-init] linuxserver/mods:swag-dashboard at sha256:404381f438a58feac95a7e84a26f61e0db8a34106da2bd6ffac6b815d6b555ed has been previously applied skipping swag | [mod-init] Applying linuxserver/mods:swag-dbip files to container
swag | tar: invalid magic
swag | tar: short read

It looks like there was an issue with downloading the second mod. That’s why there is a tar error.

It won’t redownload the mods on a container restart unless there is a mod update. It will however download them again if the container is recreated.

There is no way to store them locally.

What would be the best way to recreate the container?

How are you managing your containers? Docker? Docker Compose?

If you’re using docker-compose I’d use:
docker-compose up -d --force-recreate
might be advisable to do a docker prune first
docker system prune
then bring it back up.

Will give it a try with compose kind of annoying since I have other containers depending on it and if it hangs other containers will not work properly.

General question Any difference pulling images from

linuxserver/swag
ghcr . io/linuxserver/swag
lscr . io/linuxserver/swag

Im still running into problems with swag when it comes to pulling those mods.

I have to watch the logs and just keep doing a
docker-compose restart swag
until it succeeds

I don’t think there is a difference but I could be wrong. Can you post your docker-compose.yml for us to review?

swag portion of docker-compose.yml

version: “3.5”
services:

Swag (https)

swag:
image: linuxserver/swag
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1001
- PGID=1001
- TZ=Asia/Riyadh
- DOCKER_HOST=dockerproxy
# put your domain name here
- URL=< mydomain.duckdns.org >
# add “plex” to access it with plex.yourdomain.com
- SUBDOMAINS=wildcard
- VALIDATION=duckdns
- DUCKDNSTOKEN=< Removed my Actual Token >
- EMAIL=< myemail@email.com >
- DOCKER_MODS=linuxserver/mods:swag-dashboard|linuxserver/mods:swag-dbip
volumes:
- ~/opt/docker/volumes/swag/config:/config
- /srv/samba:/srv/samba
ports:
- 80:80
- 443:443
depends_on:
- authelia
- mariadb
- dockerproxy
labels:
- “diun.enable=true”
restart: unless-stopped

volumes:
- ~/opt/docker/volumes/swag/config:/config

Why do you have ~ here?
Also I see you have dockerproxy in there. Are you using Windows?

I personally keep all my files in my home folder in a folder named docker. Each container gets a subfolder with its name and docker-compose.yml file in it long with any folders that container may need to store data. So, in SWAGs case, I would have something like:

volumes:
- ./config:/config

and I’d have this folder made:
/home/rob/docker/swag/config
and the docker-compose.yml file in the folder:
/home/rob/docker/swag/

Have you ever had this running? If not, I’d copy my folder structure, and try running docker-compose up -d again and see what you get or anything different.

I’ve had issues with other containers using that /opt/ path incorrectly. I’d investigate that path first. Hope this is helping. Sounds like you’re really close. I’ve used SWAG in the past, but not with this dashboard. Also, you might want to add port 81:81 if you’re trying to access the dash locally. Might be helpful along the way. I saw you were missing that option when looking at the documentation. FWIW.

Its the same as you using . I have all my dockers under ~/opt which goes to my home ditectory.

Using Ubuntu Linux

Yes its working now, problem is sometimes it gets stuck when bringing down those mods during container recreation which then times out and gets those tar errors. I assume its bringing them down from github.

Thanks for all the suggestions. My problem boils down to downloading those specfic mods for some reason. It would be nice if they could be downloaded as images same as the swag image and it utilizes them rather than trying to download everytime swag container is created.

Have you tried using the - - force-recreate option when recreating containers?

docker-compose up -d --force-recreate

I’m glad you’ve got it up and running. well I’ll have to test out this SWAG and Dashboard combo myself sometime.