I thought the docker names were infinite, but if I need to believe what my2cents says about this (btw image also taken fro the article) it is not the case. It’s just a go algorithm that literally picks up a name and an adjetive from a hardcoded list. Here you have a running example and the github code. How boring explanation. It’s not aliens trying to communicate or a desperate AI doing the same π
In my eternal search for a good and free project management tool I’ve found this little jewel called Taskcafe. I went for a docker installation without changing an iota of the installation procedure, we clone the repository:
git clone https://github.com/JordanKnott/taskcafe && cd taskcafe
Now do the following:
docker-compose -p taskcafe up -d
This will start a postgres instance as well as a taskcafe instance, so two dockers, taskcafe_web_1 and taskcafe_postgres_1. But how do I log in? Fortunately there’s a trend about it. Just replace the end of the URL you got by /register. After getting my admin, the rest is easy. I create my first project, then I add lists to it, and cards. That’s it. Up and running! Beautiful β€
Again I’m with python. I want to run as package independent as possible, so I want to run the external python apps in a docker. If we have a jupyter notebook, we can easily run it this way if we have it in a “test” folder. Note that the “test” folde needs to be readable for everyone (777) or you’ll get this error :
tornado.web.HTTPError: HTTP 403: Forbidden
Anyway, this is what I get when I run my docker mapping the test folder:
# > docker run -p 8888:8888 -v "${PWD}"/test:/home/jovyan/work jupyter/scipy-notebook Entered start.sh with args: jupyter lab Executing the command: jupyter lab [I DATE ServerApp] jupyter_server_terminals | extension was successfully linked. [I DATE ServerApp] jupyterlab | extension was successfully linked. [W DATE NotebookApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release. [W DATE NotebookApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release. [I DATE ServerApp] nbclassic | extension was successfully linked. [I DATe ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret [I DATE ServerApp] notebook_shim | extension was successfully linked. [I DATE ServerApp] notebook_shim | extension was successfully loaded. [I DATE ServerApp] jupyter_server_terminals | extension was successfully loaded. [I DATE LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.10/site-packages/jupyterlab [I DATE LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab [I DATE ServerApp] jupyterlab | extension was successfully loaded. [I DATE ServerApp] nbclassic | extension was successfully loaded. [I DATE ServerApp] Serving notebooks from local directory: /home/jovyan [I DATE ServerApp] Jupyter Server 2.1.0 is running at: [I DATE ServerApp] http://XXX:8888/lab?token=XXX [I DATE ServerApp] or http://127.0.0.1:8888/lab?token=XXX [I DATE ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C DATE ServerApp]
To access the server, open this file in a browser: file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html Or copy and paste one of these URLs: http://XXX:8888/lab?token=XXX or http://127.0.0.1:8888/lab?token=XXX
You may need to ask your colleagues about something at one point, I’m sure about it. But I’m sure about also that you don’t have time, neither hardware, to program an entire survey or to install the software in a specific server. Since I’m lazy also, as you know, I looked for a docker solution until I found one that does the job. The basic principles of a lime surveyyou get on this post. This will work if your docker station has a mysql database – you will be asked to connect to the database. If you don’t have, or you don’t want to use it, we need a compose with a mysql docker.
It is worth to mention all the dockerimages I found. I hope it saves you googling time! ππ. So here you have the crramirez limesurvey image, with a pseudo-docker compose. And here you have the martialblog limesurvey, with a lot of possible customisations. Me, I’m a simple person. I don’t want to play with customisation, I want to download a compose file and get the thing working out of the box. This goal you can achieve with the acspri limesurvey. In short (or TLTR) πππ: make a folder and copy this into a docker-compose.yml file.
As usual, careful with the formattingΒ if you cut’n’paste from above. Once you have this file in a folder in the computer with dockers up and running, just type
$ docker run --name my-wp --network some-network -d wordpress
The installer quickly appears on 0.0.0.0:8080, but we are asked for database to connect. I do have a database, but the idea is to reduce “coding” to the minimum, so I go for the next recipe, with a docker compose. With the small modification of my server IP (1.2.3.4) I take the sample yml from the official page but I save it as :
And after that I go to 1.2.3.4:8080 to start the installer. As we can read above, we now have two dockers, one for the database and one for the wordpress engine. Filling up the next details for the admin is trivial, and we end up with a page like the one above (template Twenty-Twenty-Two). New user creation is also working without issues. We’ll see if the client is happy with it also! π
I feel like I need to write down this.I was fighting with a rebel docker process in a multi-purposed server so I was forced to review the services. First thing I did is to check the starting time of each service. You can find a detailed post in the geekdiary. This is done like this
systemd-analyze blame
I’m not going to copy my output, but I’ll say I didn’t find any clear culprit. Here you have the official systemd-analyze man page. Let’s say I really suspect of the docker daemon. Where’s the service file? We can cat the service like this (partial output):
[Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock ExecReload=/bin/kill -s HUP $MAINPID TimeoutSec=0 RestartSec=2 Restart=always ...
As you see, it gives you the location of the file as well as the content. Now I can change the timeout, or the restart options, or whatever I want. I go anyway for reinstalling the service completely (docker) and reviewing my docker monitoring code, so that it doesn’t make so many calls to the daemon, and after that my servicelagging problem is gone. BTW my docker error is described here. Long story short, there was nothing wrong with the service but with my code. So review your code and test it as much as you can! π
I’ve been posting about ansible for a while. You should know what you can do with it already. By defining tasks and an inventory, you can decide what to install, how and where. These recipees can be files on a folder or they could be nicely organized on a website. The Ansible Semaphore is a website that is letting you do it, at least, the physical install lets. I’ve tried the docker install, that is going to let you play with it but it comes with the corresponding isolation issues. Here you have the github page. Step by step, what I did on a CentOS client with dockers. First I create a folder for the project (semaphore) and docker-compose.yml as in the documentation. Then it’s very simple. Inside the folder, type
docker-compose up
That’s it. Go to https://localhost:3000 and enjoy your semaphore. Unfortunately it’s empty and we don’t have any ssh key, user, etc. But that’s not the important thing, right? The important thing is that all the functionalities are there. And that it’s modern, and mobile-phone friendly π. Anyway. Here’s the guide about how to install semaphore for real. And if you don’t like the GUI, you can also try the AWX GUI. A separate article may come π.
I’m a CentOS user, but it’s good to be open-minded. The debian systems are not managed in the same way than CentOS, so it’s not a stupid question if the installation instructions work out of the box. I will follow the official documentation for debian. I have root access to the machine, so no sudo needed. Let’s see:
If I want to be called a data scientist I need to know how to easily show my numbers. This means python, but not only, also an easy way to export in an app your results. I found out that you can achieve most of it with a docker. As usual, I will assume you have a healthy docker environmet. We will follow this github page but you can install it for realif you follow this guide. Actually I would keep both in mind to understand the whole thing. Briefly then:
Clone the repo. git clone https://github.com/yaojiach/docker-dash.git
Cd to the folder and build the docker. docker build -f Dockerfile.dev -t docker-dash-example-dev .
Run it. docker run -d -p 8050:8050 -v "$(pwd)"/app:/app --rm docker-dash-example-dev
That’s it. If you go now to http://localhost:8050 you should get a plot similar to the one above. Obviously you don’t want to plot the fruits consumed per american city or whatever that is. I’m pretty sure I don’t need to tell you how to modify that, but there’s that app folder on the thing you donwloaded on step 1. Open app.py and have a look. There you have it! Just modify it according to your needs… π…