-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (43 loc) · 1.67 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
###############################################
# Trend Micro CLI for C1 as a container #
# Version: early alpha #
# Alpine Linux based with python 3.9 #
# and jq included #
###############################################
# Pick up the image
FROM alpine:latest
# Reserved for the future usage
# Labeling
LABEL maintainer="stinky-fox" \
org.label-schema.schema-version="1.0" \
org.label-schema.vendor="stinky-fox" \
org.label-schema.name="THUS CLI" \
org.label-schema.description="The THUS CLI is being used to manage Cloud One environment." \
org.label-schema.vcs-url="https://github.com/stinky-fox/tm-thus-container.git" \
org.label-schema.docker.cmd="docker run -d -v /path/to/config:/root/.thus/config -v /path/to/credentials:/root/.thus/credentials puffago/tm-thus-container:latest"
# Create install and thus folders. /install folder will be deleted.
RUN mkdir -p /install/python && mkdir -p ~/.thus/
# Install and configure thus in a single layer.
RUN apk add --no-cache --virtual 'temp-utils' \
dos2unix \
gcc \
make \
g++ \
libffi-dev \
openssl-dev \
zlib-dev \
git && \
apk add --no-cache jq bash && \
git clone --branch 3.9 https://github.com/python/cpython.git /install/python && \
cd /install/python/ && \
./configure --with-ensurepip=install --enable-optimizations && \
make install -j3 && \
pip3 install tm-thus && \
cat /usr/local/bin/thus_completer_bash.sh >> ~/.bashrc && \
dos2unix ~/.bashrc &&\
apk del 'temp-utils' && \
rm -rf /install
# set SHELL
SHELL ["/bin/bash", "-c"]
# set CMD
CMD ["bash"]