Skip to content

Commit 8468982

Browse files
authored
Merge pull request #279 from linuxserver/snap
add SNAP info
2 parents 85e62f9 + 9379f58 commit 8468982

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

docs/FAQ.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,64 @@ Portainer has many issues which make it hard for us to support, such as:
228228
- No automatically created custom networks for inter-container communication
229229
- Inconsistent compose implementations on different architectures
230230
- Incorrectly applying environment variables on container upgrades
231+
232+
## Inexplicable issues when running ubuntu {#snap}
233+
234+
Many users have been facing issues that are simply inexplicable. The logs show no problems, the compose is fine, eventually it turns out they've installed the SNAP version of docker which is the source of the issues.
235+
236+
### Symptoms
237+
238+
It's difficult to identify the symptoms, but if you are running ubuntu and believe you have done everything correctly, check for SNAP docker.
239+
240+
### Resolution
241+
242+
First the user must be on an appropriate version of ubuntu to face this issue (as far as I am aware)
243+
244+
`lsb_release -a` would result in something similar to the below output
245+
```bash
246+
No LSB modules are available.
247+
Distributor ID: Ubuntu
248+
Description: Ubuntu 22.04.3 LTS
249+
Release: 22.04
250+
Codename: jammy
251+
```
252+
253+
`snap list | grep docker` would result in something similar to the below output
254+
```bash
255+
docker 20.10.24 2904 latest/stable canonical** -
256+
```
257+
258+
This means the snap version of docker is installed. Unfortunately, even if the user installed docker from the proper repo, this snap version will coexist AND be preferred. They will need to remove it, as shown below.
259+
260+
```bash
261+
oliver@home-server:~/plexDockerImage$ sudo snap remove docker
262+
[sudo] password for oliver:
263+
2023-11-15T01:06:26Z INFO Waiting for "snap.docker.dockerd.service" to stop.
264+
docker removed
265+
oliver@home-server:~/plexDockerImage$
266+
```
267+
268+
!!! info
269+
Unless automatic snapshots are disabled, a snapshot of all data for the snap is saved upon removal, which is then available for future restoration with snap restore. The --purge option disables automatically creating snapshots.
270+
271+
Following this, confirm nothing related to snap still shows.
272+
```bash
273+
~$ sudo whereis docker
274+
docker: /usr/libexec/docker
275+
```
276+
above is what we might want to see, below is how it would look if both official AND snap are installed. Seeing the snap stuff removed but the official there is OK.
277+
```bash
278+
~$ sudo whereis docker
279+
280+
docker: /usr/bin/docker /etc/docker /usr/libexec/docker /snap/bin/docker.machine /snap/bin/docker.help /snap/bin/docker.compose /snap/bin/docker /usr/share/man/man1/docker.1.gz
281+
```
282+
As you can see in the second one, multiple versions can coexist which is a big tshoot problem.
283+
284+
Once this is complete, if the expected version isn't present, simply follow [docker install on ubuntu](https://docs.docker.com/engine/install/ubuntu/)
285+
286+
When they finish, running `docker` commands may result in `-bash: /snap/bin/docker: No such file or directory` if this is the case, this is simply a shell patch issue, they can launch a new shell or simply input `hash -r` which should resolve the problem. Version info at the time of this writing should be
287+
```bash
288+
~ # docker --version && docker compose version
289+
Docker version 24.0.7, build afdd53b
290+
Docker Compose version v2.21.0
291+
```

0 commit comments

Comments
 (0)