Skip to content

Commit 8715ffd

Browse files
authored
Merge branch 'docker-rc-version' of 'https://github.com/jjmerchante/grimoirelab'
Merges #792 Closes #792
2 parents 7f8155e + 3447b34 commit 8715ffd

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
context: "{{defaultContext}}:docker"
9595
push: true
9696
tags: ${{ steps.meta.outputs.tags }}
97+
build-args: |
98+
GRIMOIRELAB_RELEASE=${{ inputs.version }}
9799
98100
- name: Sign the images with GitHub OIDC Token
99101
env:

.github/workflows/grimoirelab-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ jobs:
679679
version=${{ steps.semverup.outputs.version }}
680680
dockerfile="docker/Dockerfile"
681681
682-
sed -i "s/ENV GRIMOIRELAB_RELEASE .*/ENV GRIMOIRELAB_RELEASE \"$version\"/" $dockerfile
682+
sed -i "s/ARG GRIMOIRELAB_RELEASE=.*/ARG GRIMOIRELAB_RELEASE=\"$version\"/" $dockerfile
683683
git add $dockerfile
684684
685685
cat $dockerfile

docker/Dockerfile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
FROM python:3.12-slim-bookworm
55
LABEL maintainer="Santiago Dueñas <sduenas@bitergia.com>"
66

7-
ENV DEBIAN_FRONTEND noninteractive
8-
ENV DEPLOY_USER grimoire
9-
ENV DEPLOY_USER_DIR /home/${DEPLOY_USER}
10-
ENV CONF_DIR ${DEPLOY_USER_DIR}/conf
11-
ENV SCRIPTS_DIR ${DEPLOY_USER_DIR}/scripts
12-
ENV GRIMOIRELAB_RELEASE "1.15.1"
7+
ARG GRIMOIRELAB_RELEASE="1.15.1"
8+
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
ENV DEPLOY_USER=grimoire
11+
ENV DEPLOY_USER_DIR=/home/${DEPLOY_USER}
12+
ENV CONF_DIR=${DEPLOY_USER_DIR}/conf
13+
ENV SCRIPTS_DIR=${DEPLOY_USER_DIR}/scripts
14+
ENV GRIMOIRELAB_RELEASE=${GRIMOIRELAB_RELEASE}
1315

1416
# Initial user
1517
RUN useradd ${DEPLOY_USER} --create-home --shell /bin/bash
@@ -22,6 +24,7 @@ RUN apt-get update && \
2224
git git-core \
2325
mariadb-client \
2426
libmariadbclient-dev-compat \
27+
pkg-config \
2528
unzip curl wget sudo ssh \
2629
&& \
2730
apt-get clean && \
@@ -41,10 +44,10 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
4144
#RUN CERT_PATH=`python3 -m requests.certs` && \
4245
# cat ${DEPLOY_USER_DIR}/cacert.pem >> ${CERT_PATH}
4346

44-
ENV LANG en_US.UTF-8
45-
ENV LANGUAGE en_US:en
46-
ENV LC_ALL en_US.UTF-8
47-
ENV LANG C.UTF-8
47+
ENV LANG=en_US.UTF-8
48+
ENV LANGUAGE=en_US:en
49+
ENV LC_ALL=en_US.UTF-8
50+
ENV LANG=C.UTF-8
4851

4952
# Download basic configuration files
5053
ADD https://raw.githubusercontent.com/chaoss/grimoirelab-sirmordred/main/aliases.json ${DEPLOY_USER_DIR}/aliases.json
@@ -70,4 +73,4 @@ RUN sudo pip install -r ${CONF_DIR}/requirements.txt
7073

7174
HEALTHCHECK --interval=60s --timeout=6s --retries=1 CMD healthcheck.py -c ${CONF_DIR}/setup.cfg -s 'Exception in Task Manager' || exit 1
7275

73-
CMD ${DEPLOY_USER_DIR}/stage
76+
CMD ["/bin/sh", "-c", "${DEPLOY_USER_DIR}/stage"]

0 commit comments

Comments
 (0)