-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 824 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 824 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
FROM alpine:3.20
ARG CLI_NAME="methodaws"
ARG TARGETARCH
RUN apk update && apk add --no-cache bash jq ca-certificates
# 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 [ "methodaws" ]