Skip to content

Commit

Permalink
remove setcap cap_sys_nice ;( default docker runtine not allow execut…
Browse files Browse the repository at this point in the history
…e binary with capabilities
  • Loading branch information
Slach committed Apr 8, 2024
1 parent 99f6873 commit 8b3f897
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ ARG TARGETPLATFORM
MAINTAINER Eugene Klimov <[email protected]>
RUN addgroup -S -g 101 clickhouse \
&& adduser -S -h /var/lib/clickhouse -s /bin/bash -G clickhouse -g "ClickHouse server" -u 101 clickhouse
RUN apk update && apk add --no-cache ca-certificates tzdata bash curl libcap-setcap && update-ca-certificates
RUN apk update && apk add --no-cache ca-certificates tzdata bash curl && update-ca-certificates
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY build/${TARGETPLATFORM}/clickhouse-backup /bin/clickhouse-backup
RUN chmod +x /bin/clickhouse-backup
RUN setcap cap_sys_nice=+ep /bin/clickhouse-backup
# RUN apk add --no-cache libcap-setcap libcap-getcap && setcap cap_sys_nice=+ep /bin/clickhouse-backup
# USER clickhouse
ENTRYPOINT ["/entrypoint.sh"]
CMD [ "/bin/clickhouse-backup", "--help" ]
Expand All @@ -97,7 +97,7 @@ ARG TARGETPLATFORM
MAINTAINER Eugene Klimov <[email protected]>
COPY build/${TARGETPLATFORM}/clickhouse-backup-fips /bin/clickhouse-backup
RUN chmod +x /bin/clickhouse-backup
RUN setcap cap_sys_nice=+ep /bin/clickhouse-backup
# RUN apk add --no-cache libcap-setcap libcap-getcap && setcap cap_sys_nice=+ep /bin/clickhouse-backup


FROM ${CLICKHOUSE_IMAGE}:${CLICKHOUSE_VERSION} AS image_full
Expand All @@ -116,9 +116,7 @@ COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY build/${TARGETPLATFORM}/clickhouse-backup /bin/clickhouse-backup
RUN chmod +x /bin/clickhouse-backup
RUN setcap cap_sys_nice=+ep /bin/clickhouse-backup

# RUN apk add --no-cache libcap-setcap libcap-getcap && setcap cap_sys_nice=+ep /bin/clickhouse-backup
# USER clickhouse

ENTRYPOINT ["/entrypoint.sh"]
CMD [ "/bin/clickhouse-backup", "--help" ]

0 comments on commit 8b3f897

Please sign in to comment.