Add lavinmq image

This commit is contained in:
Daniel Berteaud 2023-11-12 10:07:45 +01:00
parent 24089725ba
commit 8f6ac5b0f0
2 changed files with 57 additions and 0 deletions

53
images/lavinmq/Dockerfile Normal file
View File

@ -0,0 +1,53 @@
FROM [[ .docker.repo ]][[ .docker.base_images.alpine.image ]] AS builder
ARG LAVINMQ_VERSION=1.2.5
WORKDIR /tmp
RUN set -euxo pipefail &&\
apk --no-cache add \
crystal \
shards \
make \
lz4-dev \
openssl-dev \
libevent -dev \
musl-dev \
ca-certificates \
curl \
tar \
nodejs \
npm \
&&\
curl -sSLO https://github.com/cloudamqp/lavinmq/archive/refs/tags/v${LAVINMQ_VERSION}.tar.gz &&\
tar xvzf v${LAVINMQ_VERSION}.tar.gz &&\
cd lavinmq-${LAVINMQ_VERSION} &&\
shards install --production &&\
npm install \
redoc-cli \
@stoplight/spectral-cli \
&&\
make docs &&\
make js lib &&\
make all CRYSTAL_FLAGS="--release --no-debug" &&\
mv bin /tmp/
FROM [[ .docker.repo ]][[ .docker.base_images.alpine.image ]]
MAINTAINER [[ .docker.maintainer ]]
ENV GC_UNMAP_THRESHOLD=1
RUN set -eux &&\
apk --no-cache add \
openssl \
pcre2 \
lz4-libs \
libpcre2-32 \
libevent \
libgcc \
gc
COPY --from=builder /tmp/bin/* /usr/local/bin/
EXPOSE 5672 15672
CMD ["lavinmq"]

View File

@ -159,3 +159,7 @@ docker:
# Logrotate
logrotate:
image: logrotate:23.11-1
# Lavinmq (AMQP server)
lavinmq:
image: lavinmq:1.25.0-1