Skip to content

Commit

Permalink
agate 3.1.1 and use system's gosu
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Nov 8, 2024
1 parent 8700511 commit 6a0f886
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# https://github.com/obiba/docker-agate
#

FROM tianon/gosu:latest AS gosu

FROM docker.io/library/eclipse-temurin:21-jre-jammy AS server-released
FROM docker.io/library/eclipse-temurin:21-jre-noble AS server-released

LABEL OBiBa <[email protected]>

Expand All @@ -18,15 +16,17 @@ ENV AGATE_ADMINISTRATOR_PASSWORD=password
ENV AGATE_HOME=/srv
ENV JAVA_OPTS=-Xmx2G

ENV AGATE_VERSION 3.1.0
ENV AGATE_VERSION 3.1.1

# Install Agate Python Client
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https unzip curl python3-pip libcurl4-openssl-dev libssl-dev
DEBIAN_FRONTEND=noninteractive apt-get install -y gosu apt-transport-https unzip curl python3-pip libcurl4-openssl-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install obiba-agate
RUN pip install --break-system-packages obiba-agate

# Install Agate Server
RUN set -x && \
Expand All @@ -36,15 +36,13 @@ RUN set -x && \
rm agate.zip && \
mv agate-${AGATE_VERSION} agate

COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/

RUN chmod +x /usr/share/agate/bin/agate

COPY ./bin /opt/agate/bin

RUN chmod +x -R /opt/agate/bin
RUN adduser --system --home $AGATE_HOME --no-create-home --disabled-password agate
RUN chown -R agate /opt/agate
RUN chmod +x -R /opt/agate/bin && \
adduser --system --home $AGATE_HOME --no-create-home --disabled-password agate && \
chown -R agate /opt/agate

VOLUME /srv

Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@

no_cache=false

all:
sudo docker build --no-cache=true -t="obiba/agate:$(tag)" . && \
sudo docker build -t="obiba/agate:latest" . && \
sudo docker image push obiba/agate:$(tag) && \
sudo docker image push obiba/agate:latest

# Build Docker image
build:
sudo docker build --no-cache=$(no_cache) -t="obiba/agate:$(tag)" .
docker build --no-cache=$(no_cache) -t="obiba/agate:$(tag)" .

push:
sudo docker image push obiba/agate:$(tag)
docker image push obiba/agate:$(tag)
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
volumes:
- /tmp/agate:/srv
mongo:
image: mongo:6.0
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER:-obiba}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD:-password}

0 comments on commit 6a0f886

Please sign in to comment.