-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 890 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 890 Bytes
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
FROM chromedp/headless-shell:129.0.6643.2
ARG CLI_NAME="methodtenable"
ARG TARGETARCH
RUN apt-get update && apt-get install -y ca-certificates git
# Setup Method Directory Structure
RUN \
mkdir -p /opt/method/${CLI_NAME}/ && \
mkdir -p /opt/method/${CLI_NAME}/var/data && \
mkdir -p /opt/method/${CLI_NAME}/var/data/tmp && \
mkdir -p /opt/method/${CLI_NAME}/var/conf && \
mkdir -p /opt/method/${CLI_NAME}/var/log && \
mkdir -p /opt/method/${CLI_NAME}/service/bin && \
mkdir -p /mnt/output
COPY ${CLI_NAME} /opt/method/${CLI_NAME}/service/bin/${CLI_NAME}
RUN \
adduser --disabled-password --gecos '' method && \
chown -R method:method /opt/method/${CLI_NAME}/ && \
chown -R method:method /mnt/output
USER method
WORKDIR /opt/method/${CLI_NAME}/
ENV PATH="/opt/method/${CLI_NAME}/service/bin:${PATH}"
ENTRYPOINT [ "methodtenable" ]