-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.deb
41 lines (36 loc) · 1.12 KB
/
Dockerfile.deb
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
37
38
39
40
41
FROM golang:1.18 as build
WORKDIR $GOPATH/src/github.com/vkumbhar94/lm-bootstrap-collector
ARG VERSION
COPY ./ ./
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /lmbc
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
# NTP is needed for some collector operations
RUN apt update && apt-get update \
&& apt install software-properties-common -y \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get install --no-install-recommends -y \
tcl \
inetutils-traceroute \
file \
iputils-ping \
ntp \
perl \
procps \
xxd curl wget \
# python3.10 \
# python3-pip \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
# && ln -s /usr/bin/python3.10 /usr/bin/python \
# && pip config set global.target /usr/local/lib/python3.10/dist-packages
# COPY --from=build /lmbc /bin
RUN curl -s https://api.github.com/repos/vkumbhar94/lm-bootstrap-collector/releases/latest \
| grep "browser_download_url.*Linux.*86_64" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
RUN #pip install --no-cache-dir logicmonitor_sdk==1.0.129
RUN mkdir /usr/local/logicmonitor
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]