Dockerfile

Thu, 23 Mar 2023 12:14:53 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 23 Mar 2023 12:14:53 +0000
changeset 172
2c17151ed21b
parent 141
7b774278ca84
child 179
8a9bf558aead
permissions
-rw-r--r--

client: Fix timeout handling

Previously, the timeout handler would fire an error that would get caught and
logged by the timer code. However that error never reached the upper levels of
scansion, leading to the whole thing just hanging.

Now we just trigger resumption of the async runner, and throw the error from
there if we haven't received the stanza yet.

With this change, timeouts are now correctly handled and reported as failures.

FROM ubuntu:xenial

MAINTAINER Matthew Wild <mwild1@gmail.com>

RUN apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        lua5.2 \
        lua-cjson \
        lua-expat \
	lua-filesystem \
        lua-sec \
        lua-socket \
        make \
    && rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/lua5.2 /usr/local/bin/lua

RUN mkdir -p /tmp/build

ADD . /tmp/build

WORKDIR /tmp/build

RUN ./configure && make && install build/scansion /usr/local/bin/scansion && rm -rf /tmp/build

ADD verse.lua /usr/local/share/lua/5.2/verse.lua

ADD misc/docker-entrypoint.sh /entrypoint.sh

RUN chmod a=rx /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

USER nobody

ADD scripts /scripts

VOLUME ["/scripts"]

WORKDIR /scripts

CMD ["-d", "/scripts"]

mercurial