Scratchpad remove docker file

NethServer Version: Nethserver 8
Module: Scratchpad

Hi,

I’m trying to run a generic container with Scratchpad using the suggested solution. https://www.youtube.com/watch?v=nuhl9WKh1Uc

I tried installing uptime-kuma for testing purposes, but I only get a blank white image. When I test it says “enable javascript in the browser”. This is a known bug with uptime-kuma. but I can’t find a solution. Does anyone know a solution?

My other question is, once I’m done testing, how can I remove this container to test another one (e.g. Firebird)?

Thank you for your help

Hi Steve, to remove a container refer to Podman docs, specifically podman stop and podman rm.

If you want to remove the whole Scratchpad instance run a command liki:

remove-module --no-preserve scratchpad1
1 Like

Thank you @davidep

I don’t want to delete the entire scratchpad, but only the uptime-kuma container that it places in the scratchpad directory. How can I remove that?

Enter scratchpad:

runagent -m scratchpad1

Show containers and their names:

podman ps

Stop container:

podman stop <name of container>

Remove container:

podman rm <name of container>

See also podman-rm — Podman documentation

Thamk you @mrmarkuz

I’m very inexperienced with poamna solutions. I knew how to delete a podman container but not how to delete a container created under scratchpad.

Your answer was enough for me to understand that you need to log in to scratchpad as user (or as a different user in a different environment) and you can find the container you are looking for.

We have a saying about this: even a good priest learns until he dies. I hope I’ll learn this sooner or later… Xen, Qemu, kvm, podman, etc., what’s next?

I need a clean scratchpad installation to try to run firebird, although I have serious doubts…

Thank you for your help.

1 Like

I’d recommend to test firebird from docker hub in scratchpad: https://hub.docker.com/r/firebirdsql/firebird
I think it’s just about adding credentials, the data volume and the port (--publish 3050:3050) to make it work basically, see also GitHub - FirebirdSQL/firebird-docker: Docker images for Firebird Database

I also thought that these might be a problem and need to be tested. I need to test the operation of firebird 3 and 2.5. I also need to try how to copy databases to the firebird data directory with scp and test remote access and speed.

I hope I succeed…

1 Like

Good luck, an NS8 firebird app would be really nice.
I’m here to help if there are issues but I’m confident that it works.

I’m trying to download the firebird image but I get the following error:
Error: invalid reference format

When I try to download from docker.io I get this:
denied: requested access to the resource is denied

I’m logged in with firefox…

It’s hard to find firebird 3 because there are 8-9 year old images and they mainly make versions 4 and 5 available.

This command worked, maybe you missed the version tag?

podman pull docker.io/firebirdsql/firebird:5.0.2

I don’t think the old images are needed, it’s possible to set the DataTypeCompatibility, see also GitHub - FirebirdSQL/firebird-docker: Docker images for Firebird Database

EDIT:

Version 3.0.9 is available, see also https://hub.docker.com/layers/firebirdsql/firebird/3.0.9/images/sha256-6ed2ff62b048988482993783b49c02236f7f6b67b4c17d4e4dac064777d330bd

As far as I know, if I don’t specify a version tag, the latest version will be downloaded. Am I wrong?

I know about it, but our Firebird 3 database developer says it’s not a good idea to use newer versions with current databases.

Thanks, I found it. I first got an error message when downloading this one, then I tried another one and that one worked too.

While I was writing the answer, I tested whether it would download if I provided the version tag. Downloaded it. Sometimes I don’t know which description to believe…

Thank you for your help. I’ll try to get it working…

1 Like

One can configure the defaults when there’s no version tag but for NS8 podman the version tag is mandatory AFAIK.
It also makes sense to use a dedicated version tag instead of latest to be sure about which version is installed.

I understand, this is an NS8 limitation for logical reasons, I just didn’t know about it… I don’t know about much else yet :(…

I installed it, started it and it’s running.

podman pull docker.io/firebirdsql/firebird:3.0.9

podman run --replace --name firebird3 --detach --publish 3050:3050 docker.io/firebirdsql/fire
bird:3.0.9

podman ps
CONTAINER ID  IMAGE                                 COMMAND     CREATED         STATUS             PORTS                   NAMES
4aff74797edb  docker.io/firebirdsql/firebird:3.0.9  firebird    12 seconds ago  Up 11 seconds ago  0.0.0.0:3050->3050/tcp  firebird3

I created a new route under HTTP Routes.

Unfortunately, I can’t reach firebird on port 3050 with telnet. Even if I change the Path (optional) value to /firebird, it doesn’t work. Firebird’s port 3050 should be reached via the route IP_address:3050, am I setting it wrong?

Maybe I need to edit firebird.conf? Where can I find it?

Thank you for your help

1 Like

A http route shouldn’t be necessary but I think you need to open the port in the firewall.

As root enter the following to open port 3050 permanently:

firewall-cmd --permanent --add-port=3050/tcp
firewall-cmd --reload

You can edit the firebird.conf configuration via environment variables, see also GitHub - FirebirdSQL/firebird-docker: Docker images for Firebird Database

I have a lot of things wrong. Under NS7 I open the port on the firewall, here I thought HTTP routes would do it for me, if I set it up. I was wrong. I also think I misunderstood that under NS8 there is no firewall, instead there is Nethsecurity, because according to them there is a firewall after all… I’m starting to get confused about things.

Not to mention when I log in with which user, we run pod with pod…

Opening the port on the firewall immediately solved the problem, I can connect to the firebird server with telnet, it listens on port 3050.

I can’t edit firebird.conf from the command line, only through the environment variable?

How will I be able to upload files to the firebird database directory (/var/lib/firebird/…) with scp?

Unfortunately, until I manage to upload at least one database file, I can’t even test whether it works with our program…

Editing it from command line may also work but I don’t know about persistence, using env vars should work in any case.

You need to setup a volume like --volume firebird-data:/var/lib/firebird/data
This way you can access it via scp in /home/scratchpad1/.local/share/containers/storage/volumes/firebird-data/_data
You need to check if the permissions of the copied files are correct afterwards.

See also GitHub - FirebirdSQL/firebird-docker: Docker images for Firebird Database

I need to install two firebirds. One should be firebird 2.5 while the other will be firebird 3. I have already installed the latter and ran it with the following command:

podman run --replace --name firebird3 --detach --publish 3050:3050 --volume firebird3-data:/v
ar/lib/firebird3/data docker.io/firebirdsql/firebird:3.0.9

The volume was also created:

ls /home/scratchpad1/.local/share/containers/storage/volumes
firebird3-data

Owned by scratchpad:scratchpad.

How will I access this remotely to upload files to it? Do I need to install anything else? Maybe just:

scp file.txt scratchpad@IP_address:/firebird3-data?

I need to change some settings and add a user to security.fdb. Where can I find the firebird container file structure so I can manually edit the firebird.conf file and securty.fdb?

Thank you for your help

1 Like

scp file.txt root@192.168.0.1:/home/scratchpad1/.local/share/containers/storage/volumes/firebird3-data/_data/

Set owner:

chown scratchpad1:scratchpad1 /home/scratchpad1/.local/share/containers/storage/volumes/firebird3-data/_data/file.txt

You could enter the container. Usually it contains vi to edit files.

podman exec -ti <firebird_containername> sh

I understand, the full path must be entered here. I’m running NS8 on debian and root ssh is not enabled, so I was wondering what user I should upload the files with. Unfortunately, uploading with user shows “Permission denied”. I guess I need to modify Debian’s configuration for root ssh?

If I manually edit the config files under firebird, will these changes be lost after restarting the container?

Thank you for your help

Sorry, I’m not in front of a pc now, I’ll answer later…

Edit: