diff --git a/.hadolint.yaml b/.hadolint.yaml index b743d78..547fb2e 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -1,3 +1,5 @@ ignored: - DL3018 # Pin versions in apk add - See: https://github.com/hadolint/hadolint/wiki/DL3018 - - DL3020 # We're copying the scripts for this operator to work \ No newline at end of file + - DL3020 # We're copying the scripts for this operator to work + - DL3047 # We're wgetting just fine + - DL3003 # It's only for during building redis that we cd \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b102ce6..15b0878 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,16 @@ FROM flant/shell-operator:v1.0.12 -RUN apk add --no-cache redis +RUN export REDIS_VERSION="7.0.5" && \ + export REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz" && \ + apk add --update --no-cache --virtual build-deps gcc make linux-headers musl-dev tar openssl-dev pkgconfig && \ + wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL" && \ + mkdir -p /usr/src/redis && \ + tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 && \ + cd /usr/src/redis/src && \ + make BUILD_TLS=yes MALLOC=libc redis-cli && \ + cp redis-cli /usr/bin/redis-cli && \ + cd && \ + redis-cli -v ADD hooks /hooks ADD engine /engine