forked from fonoster/fonoster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (31 loc) · 1.27 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM fonoster/base
LABEL maintainer="Pedro Sanders <psanders@fonoster.com>"
# Build example:
# docker build --no-cache \
# --build-arg BRANCH=dev \
# --build-arg FONOSTER_VERSION=0.2.20 \
# --tag fonoster/fonoster:0.2.20 .
ARG FONOSTER_VERSION=0.2.20
ARG BRANCH=main
ENV FONOSTER_VERSION=$FONOSTER_VERSION
ENV BRANCH=$BRANCH
WORKDIR /work
RUN apk add --no-cache --update git curl docker docker-compose openssl bash\
&& git clone https://github.com/fonoster/fonoster --depth=1 -b $BRANCH --single-branch \
&& curl -qL -o /usr/bin/netdiscover https://github.com/CyCoreSystems/netdiscover/releases/download/v1.2.5/netdiscover.linux.amd64 \
&& chmod +x /usr/bin/netdiscover \
&& mkdir -p operator config \
&& touch config/config config/user_credentials \
&& cp -a fonoster/operator/compose/* operator \
&& mv operator/env_example operator/.env \
&& cp fonoster/etc/rbac.json config \
&& cp fonoster/etc/log4j2.yml config \
&& cp fonoster/etc/bootstrap.yml config \
&& cp fonoster/etc/redis.conf config \
&& cp fonoster/etc/service_envs.json config \
&& cp fonoster/install.sh . \
&& rm -rf fonoster \
&& find . -type f -iname "*.sh" -exec chmod +x {} + \
&& mv /work/install.sh /install.sh \
&& chown -R fonoster:fonoster /work
ENTRYPOINT [ "/install.sh" ]