Skip to content

Commit

Permalink
fix(Dockerfile): set explicit home directory for Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewton03 committed Jan 22, 2025
1 parent ff5441b commit ad91483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM eclipse-temurin:17-jre-jammy

# Create liquibase user
RUN groupadd --gid 1001 liquibase && \
useradd --uid 1001 --gid liquibase liquibase && \
mkdir /liquibase && chown liquibase /liquibase
useradd --uid 1001 --gid liquibase --create-home --home-dir /liquibase liquibase && \
chown liquibase /liquibase

# Install necessary dependencies
#RUN apt-get update && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM alpine:3.20

# Create liquibase user
RUN addgroup --gid 1001 liquibase && \
adduser --disabled-password --uid 1001 --ingroup liquibase liquibase && \
mkdir /liquibase && chown liquibase /liquibase
adduser --disabled-password --uid 1001 --ingroup liquibase --home /liquibase liquibase && \
chown liquibase /liquibase

# Install smaller JRE, if available and acceptable
RUN apk add --no-cache openjdk17-jre-headless bash
Expand Down

0 comments on commit ad91483

Please sign in to comment.