Skip to content

Commit

Permalink
Update Dockerfiles for latest gearmand version and other minor tweaks (
Browse files Browse the repository at this point in the history
…#402)

* Updated Dockerfiles for latest version and other minor tweaks.
* Changed timezone into an Docker image build argument. Tweaked indentation.
  • Loading branch information
esabol authored Jul 27, 2024
1 parent 1bfa34d commit a277aca
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
31 changes: 13 additions & 18 deletions docker/example/gearmand/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gearmand/supervisord:latest
FROM gearmand/supervisord:1.0

ARG version=1.1.19.1
ARG version=1.1.21

LABEL description="Gearman Job Server Image"
LABEL maintainer="Gearmand Developers https://github.com/gearman/gearmand"
Expand All @@ -11,17 +11,17 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install \
make \
gcc \
g++ \
gperf \
libboost-all-dev \
libevent-dev \
libhiredis-dev \
libssl-dev \
libtokyocabinet-dev \
uuid-dev \
wget \
make \
gcc \
g++ \
gperf \
libboost-all-dev \
libevent-dev \
libhiredis-dev \
libssl-dev \
libtokyocabinet-dev \
uuid-dev \
wget \
&& apt-get clean autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -53,11 +53,6 @@ RUN touch /var/log/gearmand.log \
&& chown gearman:gearman /var/log/gearmand.log
COPY gearmand.conf /etc/supervisor/conf.d/gearmand.conf

# Links
RUN ln /usr/sbin/gearmand /sbin/gearmand \
&& ln /usr/bin/gearman /bin/gearman \
&& ln /usr/bin/gearadmin /bin/gearadmin

HEALTHCHECK --interval=5m --timeout=3s --retries=2 \
CMD test $(supervisorctl status gearmand | awk '{print $2}' | grep 'RUNNING' | wc -l) -eq 1 || exit 1

Expand Down
2 changes: 1 addition & 1 deletion docker/example/gearmand/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IMAGE_NAME = gearmand
IMAGE_VERSION = 1.1.19.1
IMAGE_VERSION = 1.1.21
USE_CACHE ?=

image:
Expand Down
4 changes: 2 additions & 2 deletions docker/example/gearmand/gearmand.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[program:gearmand]
user = gearman
priority = 100
###command = /sbin/gearmand --port 4730 --ssl --ssl-ca-file /var/lib/gearman/gearmand-ca.pem --ssl-certificate /var/lib/gearman/gearmand.pem --ssl-key /var/lib/gearman/gearmand.key --verbose INFO -l /var/log/gearmand.log
command = /sbin/gearmand --port 4730 --verbose INFO -l /var/log/gearman.log
###command = /usr/sbin/gearmand --port 4730 --ssl --ssl-ca-file /var/lib/gearman/gearmand-ca.pem --ssl-certificate /var/lib/gearman/gearmand.pem --ssl-key /var/lib/gearman/gearmand.key --verbose INFO -l /var/log/gearmand.log
command = /usr/sbin/gearmand --port 4730 --verbose INFO -l /var/log/gearman.log
redirect_stderr = true
stdout_logfile = /var/log/supervisor/gearman.log
stdout_logfile_maxbytes = 50MB
Expand Down
7 changes: 4 additions & 3 deletions docker/example/supervisord/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
FROM ubuntu:latest

ARG version=1.0
ARG timezone=America/New_York

LABEL description="Supervisord Base Image for Gearmand"
LABEL maintainer="Gearmand Developers https://github.com/gearman/gearmand"
LABEL version="${version}"

# Configure timezone
ENV DEBIAN_FRONTEND=noninteractive \
TZ=America/New_York \
TZ=${timezone} \
HOME=/root
RUN echo $TZ > /etc/timezone

# Install packages
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install \
supervisor \
tzdata \
supervisor \
tzdata \
&& apt-get clean autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit a277aca

Please sign in to comment.