aerokube/selenoid

Container doesn't cleanup `/tmp/` files that it created, mounting from the outside in errors

dothebart opened this issue · 4 comments

So it seems that these files remain in a mounted /tmp/

                'pulse-*',
                'xvfb-run.*',
                '.X99-lock',
                '.X11-unix',
                '.org.chromium.Chromium.*',
                '.com.google.Chrome.*',
                '.org.chromium.Chromium.*'

Imho the containers should clean them up.

This can interfere with disconnecting & reconnecting the selenoid proxy, subsequent container launches seem to get issues writing /accessing these files, multiple waiting for startup is all docker logs shows for the browser container.

@dothebart we never said mounting the same directory to all containers is a good practice. You should avoid sharing state between containers. Every container has its own clean /tmp inside. Do not sharing any state is a core idea behind Selenoid.

The core problem is that uploading files doesn't easily work without sharing /tmp/; The way to work around it is not well documented, and I couldn't get it working otherwise.

@dothebart actually uploading files does not require /tmp. Uploading files with Selenoid is documented here: https://aerokube.com/selenoid/latest/#_uploading_files_to_browser When you are using a code like this, Selenium client automatically packs all files to an archive and sends resulting archive to an HTTP endpoint with a POST request on the server side (this is already implemented on Selenoid side). Then on the server side this archive is unpacked on the local file system for the browser being automated.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.