▄▄             ▄▄▄  ▄▄▄ Power
█  █ ▄▄▄▄ ▄▄▄▄▄ █  █ █  █
█▄▄█ █▄▄▄ █ █ █ █▀▀▄ █▀▀▄
█  █ ▄▄▄█ █ █ █ █▄▄▀ █▄▄▀

Login
Register
/ ad amd64 api asm asmbb best bugs chat common debian deck design dll docker email embed fast feature files fossil fresh.ide friendly gamedev heap help hiawatha incredible interop learning libfresh limit links linux meme meta.http-equiv money mysql neo nginx numbers orly os outage pass password programmers programming proile resources safety script.alert.xss secret seo skins sodom source sourcecode subforum support tags test type work xss игнат котики парола русский тест уеб.програмиране хабр.наполеон
Categories Thread list

Docker support?

Hi John

I'm trying to install AsmBB with Docker, still not sucessful. Does anyone success with Docker? It will be awsome if AsmBB goes with Alpine Linux in Docker or Docker-compose ?roflIt will be supper fast and lightweight ?;-)

ganuonglachanh

Hi John

I'm trying to install AsmBB with Docker, still not sucessful. Does anyone success with Docker? It will be awsome if AsmBB goes with Alpine Linux in Docker or Docker-compose ?roflIt will be supper fast and lightweight ?;-)

I know absolutely nothing about Docker. Only that it is somehow related to virtualization... So, I can be of very little help about the Docker issues.

In order to have AsmBB working you need several conditions:

1. 32 or 64bit x86 CPU. 2. Linux 3. Running web server supporting FastCGI and properly tuned to send all the requests to AsmBB engine. 4. Running AsmBB engine.

What actually is not working in your attempts?

johnfound
ganuonglachanh

Hi John

I'm trying to install AsmBB with Docker, still not sucessful. Does anyone success with Docker? It will be awsome if AsmBB goes with Alpine Linux in Docker or Docker-compose ?roflIt will be supper fast and lightweight ?;-)

I know absolutely nothing about Docker. Only that it is somehow related to virtualization... So, I can be of very little help about the Docker issues.

In order to have AsmBB working you need several conditions:

1. 32 or 64bit x86 CPU. 2. Linux 3. Running web server supporting FastCGI and properly tuned to send all the requests to AsmBB engine. 4. Running AsmBB engine.

What actually is not working in your attempts?

Hi, I'm trying to install with Docker, since it is not fully support systemd, can we use it with supervisord ? Any tutorial setting would be appreciated

And with Docker when I run./engine to test, the CPU usage increase and it still failed to access the board in webbrowser (setting in nginx conf is done as the guide)

ganuonglachanh

Hi, I'm trying to install with Docker, since it is not fully support systemd, can we use it with supervisord ? Any tutorial setting would be appreciated

And with Docker when I run./engine to test, the CPU usage increase and it still failed to access the board in webbrowser (setting in nginx conf is done as the guide)

Systemd is not required for AsmBB. In my setup it is used only for running ./engine at the server startup. Also to restart on crashes, but AsmBB never crash actually. ?;-)

Anyway if there is no systemd, you can run engine in arbitrary way. It only needs to be started.

On the other hand, the CPU usage should not increase when engine is running, but not used. Maybe only for few milliseconds when AsmBB opens the database and create the sockets.

Does the engine create the database file on the first run? ( asmbb/board.sqlite )

Does the engine create the socket on startup? ( asmbb/engine.sock )

Does the engine create the IPC shared memory file? ( asmbb/asmbb_ipc.bin )

What is the user that runs engine? What are the user permissions for the asmbb/ directory? It needs to have writing permissions there.

What returns nginx on the requests?

johnfound
ganuonglachanh

Hi, I'm trying to install with Docker, since it is not fully support systemd, can we use it with supervisord ? Any tutorial setting would be appreciated

And with Docker when I run./engine to test, the CPU usage increase and it still failed to access the board in webbrowser (setting in nginx conf is done as the guide)

Systemd is not required for AsmBB. In my setup it is used only for running ./engine at the server startup. Also to restart on crashes, but AsmBB never crash actually. ?;-)

Anyway if there is no systemd, you can run engine in arbitrary way. It only needs to be started.

On the other hand, the CPU usage should not increase when engine is running, but not used. Maybe only for few milliseconds when AsmBB opens the database and create the sockets.

Does the engine create the database file on the first run? ( asmbb/board.sqlite )

Does the engine create the socket on startup? ( asmbb/engine.sock )

Does the engine create the IPC shared memory file? ( asmbb/asmbb_ipc.bin )

What is the user that runs engine? What are the user permissions for the asmbb/ directory? It needs to have writing permissions there.

What returns nginx on the requests?

Hi, I tried install in Virtual Box with Ubuntu then it worked! ?rofl So my guest is ./engine is not work in docker environment (had 100% CPU usage for 1 core) ?:'-( No engine.sock, No asmbb_ipc.bin, NO board.sqlite were created!

So with Virtual Box (*full* OS virtualization) it worked, but with Docker/Docker-compose (*semi* virtualization) it won't work ?:-(

ganuonglachanh

So my guest is ./engine is not work in docker environment (had 100% CPU usage for 1 core) ?:'-( No engine.sock, No asmbb_ipc.bin, NO board.sqlite were created!

It should work. I can't see any reasons to not work actually... Maybe it is some kind of bug related to the docker architecture...

Will probably try to install docker and make some tests...

johnfound
ganuonglachanh

So my guest is ./engine is not work in docker environment (had 100% CPU usage for 1 core) ?:'-( No engine.sock, No asmbb_ipc.bin, NO board.sqlite were created!

It should work. I can't see any reasons to not work actually... Maybe it is some kind of bug related to the docker architecture...

Will probably try to install docker and make some tests...

Hi, good to here you are interested in docker ?rofl

I attached my test docker-compose for you. It is pretty simple to get start. Make sure you check to source code of it first, just text, no binary.

1. install docker and docker compose (google tutorial for your Linux distro)

2. cd to asmbb, which have the docker-compose.yml

3. run command: docker-compose up -d

4. to get to bash of docker machine:

docker exec -it asmbb_ubuntu /bin/bash

5. play around:

start nginx: nginx &

cd / var / www/html

./engine

log file: varlog/nginx/ nginx conf file: etcnginx/ and etcnginx/sites-enabled/

I don't now how to debug asm in this docker machine, so just install tools like real machine and you are good to go.

6. to stop docker: docker-compose stop

7. to re-create docker machine : docker-compose down then docker-compose up -d

Have fun ?rofl

Attached files:
FileSizeUploadedDownloadsMD5 hash
asmbb.zip2960 bytes03.12.20188ff0d3b35372f5df278dfef22c814de59

Well, I have some results now.

The problem is actually that the program running in docker can't use the kernel API personality with the needed options.

There are different solutions to this issue. First to include the following option in the docker-compose.yml: security_opt: - seccomp:unconfined

This solution works (I was able to run AsmBB this way) but it is not the best solution, because it allows all kernel API to be exposed to the container (some are usually disabled for security reasons).

The second option is to allow only the needed personality options by changing the docker security profile.

This procedure (not very clear for me) is described here.

The default .json profile is here and there are several elements with the allowed variants of personality. One more have to be added: { "names": [ "personality" ], "action": "SCMP_ACT_ALLOW", "args": [ { "index": 0, "value": 134217736, "valueTwo": 0, "op": "SCMP_CMP_EQ" } ], "comment": "", "includes": {}, "excludes": {} }

But as I already said this second procedure is a little bit out of my competence and understanding...

But I am confident, that this very API call can't bring any security issues. And I am not very sure why it is excluded from the default security profile of Docker. It actually switches the address space of a 32bit program to 3GB (instead of 4GB by default).

johnfound

Well, I have some results now.

But I am confident, that this very API call can't bring any security issues. And I am not very sure why it is excluded from the default security profile of Docker. It actually switches the address space of a 32bit program to 3GB (instead of 4GB by default).

Thank you very much johnfound

I edited my Asmbb docker with your suggestions and it worked ?rofl

I attached it below and you can use it as a starter guide for users who want to try AsmBB with Docker ?;-)

Attached files:
FileSizeUploadedDownloadsMD5 hash
asmbb.zip5777 bytes04.12.201810c0bd02e76bfdf2874c4498ce812b759e
ganuonglachanh

I attached it below and you can use it as a starter guide for users who want to try AsmBB with Docker ?;-)

Thanks. It works for me too.

Maybe you will write later some short tutorial explaining step-by-step how to install and manage AsmBB with Docker? And what are the advantages (and disadvantages) of this approach.

Honestly, it seems to be an over-complicated way to run nginx+asmbb. But it is probably my ignorance. ?:-)

Categories Thread list

Docker support?

AsmBB v2.4 (check-in: 7bb3292ed42db7ca); SQLite v3.25.3 (check-in: 89e099fbe5e13c33);

©2016..2018 John Found; Licensed under EUPL.
Powered by Assembly language
Created with Fresh IDE

Icons are made by Egor Rumyantsev, vaadin and icomoon from www.flaticon.com