build in two steps
This commit is contained in:
parent
b0a9545e14
commit
3052602c43
2 changed files with 12 additions and 4 deletions
|
@ -2,7 +2,7 @@ pipeline:
|
|||
publish:
|
||||
image: plugins/docker
|
||||
registry: registry.nulo.in
|
||||
repo: registry.nulo.in/sutty/CHANGEME
|
||||
repo: registry.nulo.in/sutty/redis
|
||||
tags:
|
||||
- ${ALPINE_VERSION}
|
||||
- latest
|
||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -1,12 +1,10 @@
|
|||
ARG ALPINE_VERSION=3.13.6
|
||||
ARG BASE_IMAGE=sutty/monit
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
RUN apk add --no-cache redis
|
||||
|
||||
COPY ./monit.conf /etc/monit.d/redis.conf
|
||||
|
||||
RUN sed -re "/^bind /d" -i /etc/redis.conf
|
||||
RUN sed -re "/^protected-mode /d" -i /etc/redis.conf
|
||||
RUN sed -re "/^logfile /d" -i /etc/redis.conf
|
||||
|
@ -18,5 +16,15 @@ RUN echo "protected-mode no" >> /etc/redis.conf
|
|||
RUN echo "maxmemory-policy allkeys-lfu" >> /etc/redis.conf
|
||||
RUN echo "maxmemory 100mb" >> /etc/redis.conf
|
||||
|
||||
ARG ALPINE_VERSION=3.13.6
|
||||
ARG BASE_IMAGE=sutty/monit
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
RUN apk add --no-cache redis
|
||||
|
||||
COPY --from=build /etc/redis.conf /etc/redis.conf
|
||||
COPY ./monit.conf /etc/monit.d/redis.conf
|
||||
|
||||
EXPOSE 6379
|
||||
VOLUME "/var/lib/redis"
|
||||
|
|
Loading…
Reference in a new issue