[Resolved] Docker

Status
Not open for further replies.

toki

Active Member
#1
Hi,

Is LiteSpeed Enterprise supported running within a docker container? I've tried many things but cannot get it to work properly (end up with a lot of brk() calls followed by EACCES)

[pid 58] brk(0x248c000) = 0x248c000
[pid 58] brk(0x24cc000) = 0x24cc000
[pid 58] brk(0x250c000) = 0x250c000
[pid 58] brk(0x254c000) = 0x254c000
[pid 58] brk(0x248c000) = 0x248c000
...many many times...
[pid 58] brk(0x24cc000) = 0x24cc000
[pid 58] brk(0x250c000) = 0x250c000
[pid 58] brk(0x254c000) = 0x254c000
[pid 58] brk(0x248c000) = 0x248c000
[pid 58] lstat(0x7ffd48796e30, 0x7ffd48796d30) = -1 EACCES (Permission denied)
[pid 58] lstat(0x7ffd48796e30, {...}) = 0
[pid 58] open(0x2084ca0, O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
[pid 58] chmod(0x20d1268, 0600) = -1 EACCES (Permission denied)

Thanks
Toki
 

Pong

Administrator
Staff member
#2
LiteSpeed supports docker container. Our lab test shows it is running fine.

Is there anyway to reproduce your error?
 

toki

Active Member
#3
Hi,

Thanks for getting back to me.

Please could I see a sample working dockerfile?

This error occurs when trying to access the Admin server (it just hangs, and I see these calls if I strace the lshttpd process.

Cheers
Toki
 

toki

Active Member
#4
For reference, here is my Dockerfile:
Code:
FROM debian:jessie

# still need swap dirs

RUN apt-get update && apt-get -y upgrade && apt-get clean
RUN mkdir -p /var/log/litespeed
RUN groupadd -g 1001 lsadm
RUN useradd -d /dev/null -s /usr/sbin/nologin -g lsadm -u 999 lsadm
RUN chown -R lsadm:lsadm /var/log/litespeed
RUN mkdir -p /usr/local/lsws

ADD lsws-5.0.8.tar.gz /usr/local/lsws
RUN rm -rf /usr/local/lsws/admin/tmp
RUN ln -s /tmp /usr/local/lsws/admin/tmp

VOLUME /usr/local/lsws/conf

EXPOSE 80 7080

CMD ["sh", "-c", "/usr/local/lsws/bin/lswsctrl start; tail -F /var/log/litespeed/lsws-error.log /var/log/litespeed/lsws-access.log" ]
My docker run command is then:
Code:
docker run --privileged=true -p 80:80 -p 7080:7080 -v /usr/local/lsws/conf:/usr/local/lsws/conf --restart=always -d --name test1 docker:test1
I've tried running as nobody/nogroup and get the same result. The webserver serves fine on Port 80 (I can get phpinfo.php back for example), but the Admin interface does not work.
 

toki

Active Member
#5
Fixed it - was permissions on /usr/local/lsws/admin/conf :)

If anyone else experiences similar problems, strace on debian:jessie doesn't return full paths in some calls, e.g.

Code:
[pid 58] lstat(0x7ffd48796e30, 0x7ffd48796d30) = -1 EACCES (Permission denied)
[pid 58] lstat(0x7ffd48796e30, {...}) = 0
[pid 58] open(0x2084ca0, O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
[pid 58] chmod(0x20d1268, 0600) = -1 EACCES (Permission denied)
I ran up the image under centos:latest, strace'd the admin_php5 process and got the actual paths to the files it was complaining about.
 
Last edited:
Status
Not open for further replies.
Top