Skip to content

Commit

Permalink
cleanup Dockerfile a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
actualben committed May 16, 2024
1 parent 38e2972 commit fd626ec
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions pgformatter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
FROM backplane/ghlatest as downloader

RUN set -eux; \
mkdir -p /work/pgFormatter; \
cd /work/pgFormatter; \
ghlatest download --source --extract --rm darold/pgFormatter; \
mv /work/pgFormatter/* /work/pgFormatter/src
FROM backplane/ghlatest as dl
RUN ghlatest download --source --extract --rm darold/pgformatter
RUN mv darold-pgFormatter-* src

FROM perl:5-slim as builder
ARG CHARSET=UTF-8
COPY --from=downloader /work/pgFormatter/src /src/
WORKDIR /work

COPY --from=dl /work/src /work/src
RUN set -eux; \
cd /src; \
cd src; \
perl Makefile.PL; \
make; \
make install; \
cd /; \
rm -rf /src;
rm -rf /work

FROM scratch
COPY --from=builder / /

ARG CHARSET=UTF-8
LABEL maintainer="Backplane BV <[email protected]>"
COPY --from=builder / /

# Add non-privileged user
RUN set -eux; \
Expand Down

0 comments on commit fd626ec

Please sign in to comment.