mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
22 lines
553 B
Docker
22 lines
553 B
Docker
FROM alpine:3.11
|
|
|
|
COPY . trojan
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
build-base \
|
|
cmake \
|
|
boost-dev \
|
|
openssl-dev \
|
|
mariadb-connector-c-dev \
|
|
&& (cd trojan && cmake . && make -j $(nproc) && strip -s trojan \
|
|
&& mv trojan /usr/local/bin) \
|
|
&& rm -rf trojan \
|
|
&& apk del .build-deps \
|
|
&& apk add --no-cache --virtual .trojan-rundeps \
|
|
libstdc++ \
|
|
boost-system \
|
|
boost-program_options \
|
|
mariadb-connector-c
|
|
|
|
WORKDIR /config
|
|
CMD ["trojan", "config.json"]
|