forked from epam/edp-codebase-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 871 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 871 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.15.4
ENV ASSETS_DIR=/usr/local/bin \
HOME=/home/codebase-operator \
OPERATOR=/usr/local/bin/codebase-operator \
SSH_KNOWN_HOSTS=/home/codebase-operator/.ssh/known_hosts \
USER_NAME=codebase-operator \
USER_UID=1001
RUN apk add --no-cache ca-certificates=20211220-r0 \
openssh-client==8.8_p1-r1 \
git==2.34.4-r0
RUN adduser -h ${HOME} -s /bin/ash -D -u ${USER_UID} codebase-operator
COPY build/bin ${ASSETS_DIR}
COPY --chmod=0775 build/templates ${ASSETS_DIR}/templates
COPY build/configs ${ASSETS_DIR}/configs
COPY build/img ${ASSETS_DIR}/img
RUN chmod u+x ${ASSETS_DIR}/user_setup && \
chmod ugo+x ${ASSETS_DIR}/entrypoint && \
${ASSETS_DIR}/user_setup
# install operator binary
COPY ./dist/go-binary ${OPERATOR}
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER ${USER_UID}