You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
842 B
19 lines
842 B
FROM alpine:latest as builder
|
|
RUN apk update && apk upgrade && apk add --no-cache bash util-linux cmake make gcc git sqlite-dev openssl-dev git build-base
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN cmake . && make
|
|
RUN sed -i 's/\/usr\/lib\/uhub\//\/libs\//g' ./doc/*.conf && \
|
|
sed -i 's/\/usr\/lib\/uhub\//\/libs\//g' ./doc/rules.txt && \
|
|
sed -i 's/\/etc\/uhub\//\/conf\//g' ./doc/*.conf && \
|
|
sed -i 's/\/etc\/uhub\//\/conf\//g' ./doc/rules.txt && \
|
|
echo 'Welcome to uHub' > ./doc/motd.txt
|
|
|
|
FROM alpine:latest
|
|
RUN apk update && apk upgrade && apk add --no-cache bash util-linux openssl-dev sqlite-dev
|
|
WORKDIR /app
|
|
COPY --from=builder /app/uhub .
|
|
COPY --from=builder /app/doc/plugins.conf /app/doc/uhub.conf /app/doc/users.conf /app/doc/rules.txt /app/doc/motd.txt /conf/
|
|
COPY --from=builder /app/*.so /libs/
|
|
ENTRYPOINT ["./uhub"]
|
|
CMD ["-c","/conf/uhub.conf"]
|
|
|