Skip to content

Commit

Permalink
chore(Dockerfile): remove unnecessary symbolic link creation for /doc…
Browse files Browse the repository at this point in the history
…ker-entrypoint.sh

chore(Dockerfile): change working directory to /liquibase/changelog to match the symbolic link
chore(Dockerfile.alpine): remove unnecessary symbolic link creation for /docker-entrypoint.sh
chore(Dockerfile.alpine): change working directory to /liquibase/changelog to match the symbolic link
  • Loading branch information
jandroav committed Jan 12, 2024
1 parent 020928c commit b27c777
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ RUN addgroup --gid 1001 liquibase && \

# Setup symbolic links
RUN ln -s /liquibase/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh && \
ln -s /liquibase/docker-entrypoint.sh /docker-entrypoint.sh && \
ln -s /liquibase/liquibase /usr/local/bin/liquibase && \
ln -s /liquibase/bin/lpm /usr/local/bin/lpm
ln -s /liquibase/bin/lpm /usr/local/bin/lpm && \
ln -s /liquibase/changelog /liquibase

WORKDIR /liquibase/changelog
# Create a symbolic link to make /liquibase/changelog and /liquibase the same
RUN ln -s /liquibase/changelog /liquibase

USER liquibase
ENV LIQUIBASE_HOME=/liquibase

Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ RUN addgroup --gid 1001 liquibase && \

# Make /liquibase directory and change owner to liquibase
RUN mkdir /liquibase && chown root:root /liquibase
WORKDIR /liquibase/changelog

# Copy the /liquibase directory from builder stage into final image
COPY --from=builder /liquibase /liquibase
Expand All @@ -49,9 +48,11 @@ ENV LIQUIBASE_HOME=/liquibase

# Symbolic links
RUN ln -s /liquibase/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh && \
ln -s /liquibase/docker-entrypoint.sh /docker-entrypoint.sh && \
ln -s /liquibase/liquibase /usr/local/bin/liquibase && \
ln -s /liquibase/bin/lpm /usr/local/bin/lpm
ln -s /liquibase/bin/lpm /usr/local/bin/lpm && \
ln -s /liquibase/changelog /liquibase

WORKDIR /liquibase/changelog

USER liquibase

Expand Down

0 comments on commit b27c777

Please sign in to comment.