mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
b90f49987f
Create example Dockerfile and document its use in the User Manual. This provides a minimal Alpine Linux based starting point for users who want to build a custom Laminar Docker container.
46 lines
1.3 KiB
Docker
46 lines
1.3 KiB
Docker
FROM alpine:edge
|
|
|
|
EXPOSE 8080
|
|
|
|
LABEL org.label-schema.name="laminar" \
|
|
org.label-schema.description="Fast and lightweight Continuous Integration" \
|
|
org.label-schema.usage="/usr/doc/UserManual.md" \
|
|
org.label-schema.url="https://laminar.ohwg.net" \
|
|
org.label-schema.vcs-url="https://github.com/ohwgiles/laminar" \
|
|
org.label-schema.schema-version="1.0" \
|
|
org.label-schema.docker.cmd="docker run -d -p 8080:8080 laminar"
|
|
|
|
RUN apk add --no-cache -X http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
|
sqlite-dev \
|
|
zlib \
|
|
capnproto \
|
|
tini
|
|
|
|
ADD UserManual.md /usr/doc/
|
|
|
|
ADD . /build/laminar
|
|
|
|
RUN apk add --no-cache --virtual .build -X http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
|
build-base \
|
|
cmake \
|
|
capnproto-dev \
|
|
boost-dev \
|
|
zlib-dev \
|
|
rapidjson-dev && \
|
|
cd /build/laminar && \
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ && \
|
|
make -j4 && \
|
|
make install && \
|
|
apk del .build && \
|
|
rm -rf /build
|
|
|
|
# Create laminar system user in "users" group
|
|
RUN adduser -SDh /var/lib/laminar -g 'Laminar' -G users laminar
|
|
# Set the working directory to the laminar user's home
|
|
WORKDIR /var/lib/laminar
|
|
# Run the preceeding as the user laminar
|
|
USER laminar
|
|
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
|
CMD [ "laminard" ]
|