Error response from daemon: Windows does not support privileged mode - selenium

I have installed the Docker Tool on my Windows 10 Pro machine.
Have pulled below images from Docker Hub:
docker pull elgalu/selenium
docker pull dosel/zalenium
When I am trying to start zalenium with the below command:
"docker run --rm -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /c/Users/<username>:/home/seluser/videos --privileged dosel/zalenium start"
I am getting error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error
response from daemon: Windows does not support privileged mode.
I want to start the zalenium with the above command but I could not able to do it, because of this error.
Can anyone assist me on this, please?

Unfortunately you did not provide enough information. Your Windows version, Docker for Windows version, how did you install it, etc.
Officially --priviledged flag is not supported as on the Github thread is already mentioned:
there is no support for privileged containers on Windows in the platform.
It's also confirmed in this thread.
In addition, you might check this thread. It's the same case.

I had the same problem. Update on the newest docker version, fixed the issue.

Related

How to install MSSQL-Server on Ubuntu 22.04

I am trying to install MSSQL-Server on my Ubuntu 22.04. I know that it does not currently support Ubuntu 22.04. I need to find a workaround to install the software as I don't want to downgrade.
I tried installing but it keeps giving me dependency errors. How do I solve it? Any help would be appreciated.
Unfortunately, at this time, SQL Server 2019 only works on Ubuntu 20/21. 22.04 is not supported at this time.
So either you will have to use Ubuntu 20 or, as others have stated, use Docker Containers.
You can install Docker into Ubuntu 22.04. It's a multi-step process, but it isn't that difficult.
Install Docker Engine on Ubuntu (follow the Install using the repository section)
https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
Install SQL Server Container
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
That should do it.
Also, in link #2, read further below on how to connect to your docker image to run SQLCMD from within the container.
Like SQL Server 2019, you cannot install the SQLCMD tools directly into your Ubuntu 22.04 installation. But the Docker container image contains the sqlcmd tool for you to be able to connect to the database.
Or, you can use Visual Studio Code with the SQL Server (mssql) extension and it can connect to your SQL Server instance in your running Docker container.
The connection string would be:
"Server=localhost;Database=your database name;User Id=user id;Password=password"
You can leave out the Database setting if you just want to connect to the default database.
If you create any databases, you can then connect to them directly by specifying the name.
I also have same problem like this. I also tried downgrading Openssl to 1.1.1k and 1.1.1s but still not works. And finally I found this explanation
https://github.com/microsoft/msphpsql/issues/1419#issuecomment-1303626500
So, keep use OpenSSL 3.0.2 and you just need to change the SECLEVEL to 0 instead of 1 in /etc/ssl/openssl.conf
[system_default_sect]
CipherString = DEFAULT:#SECLEVEL=0
And it works, now I can connect to SQL Server using Ubuntu 22.04.
Looked at this
and it has worked for me!
So worth giving it a shot
cd /opt/mssql/lib
ls -la
sudo rm libcrypto.so libssl.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 libcrypto.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 libssl.1.1
If libssl is not installed, try:
sudo apt install libssl1.1
Update: I had issues connecting using libssl1.1, so I switched to 1.0 after performing the previous steps, so I also did the following:
sudo systemctl stop mssql-server
sudo systemctl edit mssql-server
Added:
[Service]
Environment="LD_LIBRARY_PATH=/opt/mssql/lib"
Then:
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /opt/mssql/lib/libssl.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /opt/mssql/lib/libcrypto.so
Then started mysql-server and things just worked fine!

How to reset Alpine distro in WSL2?

I completely borked my Alpine configuration when attempting to connect Docker Desktop several times. I've done the usual --unregister Alpline and then reinstalling from the app store.
Is there a quicker way of doing this?
I've gotten this to work in Windows 11 Pro without touching the UI.
Open Windows Powershell in Windows Terminal.
Verify that Alpine is installed: wsl -l -v
Unregister Alpine: wsl --unregister Alpine
Verify that Alpine has been unregistered: wsl -l -v
Register Alpine by starting it: Alpine
Unregistering the Alpine distro from WSL does not delete it from your system.

How to run flatpak app as a systemd service?

I'm using playwright to run automated testing on CentOS 8.
Node script are run as systemd services.
Chromium is used from the rpm package.
But chromium from rpm package has problems with video codec support.
I installed chromium from flatpak and tried to run it...
After the first failure, I went to github playwright repo.
Then I created another question, but already in the flatpack repo.
In short, when I try to start chromium from flatpak from script that is running as a systemd service, I get an error:
Cannot autolaunch D-Bus without X11 $DISPLAY
(zenity:8): Gtk-WARNING **: 17:13:28.767: cannot open display:
As far as I understand, I need to somehow make sure that the script running as a service has a dbus... How to do it?
You need to set correct Environment= inside your unit or export all required variables using
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
See
https://unix.stackexchange.com/a/653101
https://wiki.archlinux.org/title/systemd/User#Environment_variables
After that, even with a basic unit below
~/.config/systemd/user/chromium.service
[Unit]
Description=Chromium
[Service]
ExecStart=/usr/bin/flatpak run org.chromium.Chromium
ExecStop=/usr/bin/flatpak kill org.chromium.Chromium
[Install]
WantedBy=default.target
systemctl --user start chromium will open your browser

Why is the server getting Kotlin compilation errors?

Kotlin builds fine locally. However, it does not work properly on the server.
Below is the error log.
/root/.sdkman/candidates/kotlin/current/bin/kotlinc: line 80: 34 Killed "${JAVACMD:=java}" $JAVA_OPTS "${java_args[#]}" -cp "${kotlin_app[#]}" "${kotlin_args[#]}"
Why does this error occur?
The server is running as a docker command in the Ubuntu 18.04 environment.
Below is the dockerfile
RUN apt-get install sudo -y
RUN curl -s https://get.sdkman.io | bash
RUN chmod u+x "$HOME/.sdkman/bin/sdkman-init.sh"
RUN /bin/bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install kotlin"
ENV PATH /root/.sdkman/candidates/kotlin/current/bin:$PATH
Additionally, I am using version 13 of jdk.
I solved it. It was docker container memory problem. I increased the docker container from 256mb to 1gb and it works fine. Thank you for trying to help.

Boot2Docker start up fails in windows

I am trying to start docker from winodws7 enterprise edition.
boot2docker start
results
Waiting for VM and Docker daemon to start...
..........................................................................oooooo
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Started.
Trying to get Docker socket one more time
Error requesting socket: exec: "ssh": executable file not found in %PATH%
Docker client does not run on Windows for now. Please use
"boot2docker" ssh
to SSH into the VM instead.
I tried this link. But All answers doesn't help me. I have re-installed the boot2docker and powered off boot2docker-vm in Virtual machine and restarted. Virtualisation is enabled in my bios. My Sys has better capabilities.
Using 1.4.1 version.
Please Some Suggestions?
As boot2docker complained, you don't have ssh in your path. Please add ssh.exe into Windows path (it might not be visible, but boot2docker installation includes msys-git installation which includes ssh.exe, so you need to add Git installation directory in path, e.g.
c:\Program Files (x86)\Git\bin