Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade alpine version #77

Merged
merged 5 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.15 as builder
FROM alpine:3.19 as builder

LABEL maintainer="Opstree Solutions"

Expand Down Expand Up @@ -31,7 +31,7 @@ RUN VERSION=$(echo ${REDIS_VERSION} | sed -e "s/^v//g"); \
make -C redis-${VERSION} all; \
make -C redis-${VERSION} install

FROM alpine:3.15
FROM alpine:3.19

LABEL maintainer="Opstree Solutions"

Expand All @@ -46,6 +46,8 @@ LABEL version=1.0 \
COPY --from=builder /usr/local/bin/redis-server /usr/local/bin/redis-server
COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli

RUN apk update && apk upgrade

RUN addgroup -S -g 1000 redis && adduser -S -G redis -u 1000 redis && \
apk add --no-cache bash

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.exporter
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.15 as builder
FROM alpine:3.19 as builder

ARG TARGETARCH

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.sentinel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.15 as builder
FROM alpine:3.19 as builder

ARG TARGETARCH

Expand Down Expand Up @@ -30,7 +30,7 @@ RUN VERSION=$(echo ${REDIS_SENTINEL_VERSION} | sed -e "s/^v//g"); \
make -C redis-${VERSION} all; \
make -C redis-${VERSION} install

FROM alpine:3.15
FROM alpine:3.19

ARG TARGETARCH

Expand All @@ -44,6 +44,8 @@ LABEL version=1.0 \
COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli
COPY --from=builder /usr/local/bin/redis-sentinel /usr/local/bin/redis-sentinel

RUN apk update && apk upgrade

RUN addgroup -S -g 1000 redis && adduser -S -G redis -u 1000 redis && \
apk add --no-cache bash

Expand Down
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
CONTAINER_ENGINE ?= docker
REDIS_VERSION ?= v7.0.13
SENTINEL_VERSION ?= v7.0.13
EXPORTER_VERSION ?= v1.48.0
REDIS_SENTINEL_VERSION ?= v7.0.13
REDIS_EXPORTER_VERSION ?= v1.61.0

IMG ?= quay.io/opstree/redis:$(REDIS_VERSION)
EXPORTER_IMG ?= quay.io/opstree/redis-exporter:$(EXPORTER_VERSION)
SENTINEL_IMG ?= quay.io/opstree/redis-sentinel:$(SENTINEL_VERSION)
EXPORTER_IMG ?= quay.io/opstree/redis-exporter:$(REDIS_EXPORTER_VERSION)
SENTINEL_IMG ?= quay.io/opstree/redis-sentinel:$(REDIS_SENTINEL_VERSION)

build-redis:
docker build -t ${IMG} -f Dockerfile .
${CONTAINER_ENGINE} build -t ${IMG} -f Dockerfile --build-arg REDIS_VERSION=${REDIS_VERSION} .

push-redis:
docker push ${IMG}
${CONTAINER_ENGINE} push ${IMG}

build-redis-exporter:
docker build -t ${EXPORTER_IMG} -f Dockerfile.exporter .
${CONTAINER_ENGINE} build -t ${EXPORTER_IMG} -f Dockerfile.exporter --build-arg REDIS_EXPORTER_VERSION=${REDIS_EXPORTER_VERSION} .

push-redis-exporter:
docker push ${EXPORTER_IMG}
${CONTAINER_ENGINE} push ${EXPORTER_IMG}

build-sentinel :
docker build -t ${SENTINEL_IMG} -f Dockerfile.sentinel .
${CONTAINER_ENGINE} build -t ${SENTINEL_IMG} -f Dockerfile.sentinel --build-arg REDIS_SENTINEL_VERSION=${REDIS_SENTINEL_VERSION} .

push-sentinel :
docker push ${SENTINEL_IMG}
${CONTAINER_ENGINE} push ${SENTINEL_IMG}

setup-standalone-server-compose:
docker-compose -f docker-compose-standalone.yaml up -d
Expand Down
Loading