Skip to content

Commit

Permalink
Fix broken Elasticsearch 6 container
Browse files Browse the repository at this point in the history
The underlying version of Ubuntu for our custom ES6 container has
changed, and it now includes a non-root user by default, with the same
ID as the one which we were previously creating. This was causing the
image build to fail.

- Remove custom non-root user setup and replace with default non-root
  user
  • Loading branch information
csutter committed Jul 30, 2024
1 parent 6f4dd56 commit 7d51f1e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions services/elasticsearch-6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ FROM eclipse-temurin:8-jre

ARG ELASTICSEARCH_VERSION=6.7.2

ARG USERNAME=elastic
ARG USER_UID=1000
ARG USER_GID=${USER_UID}

# Set up unprivileged local user
RUN groupadd --gid ${USER_GID} ${USERNAME} \
&& useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME}
# As of Ubuntu 24.04, the official Docker image (which the Eclipse Temurin one is based on) ships
# with an existing non-root user called "ubuntu"
ARG USERNAME=ubuntu

# Install required tooling
RUN apt update && apt install -y curl
Expand Down

0 comments on commit 7d51f1e

Please sign in to comment.