Skip to content

Commit

Permalink
WIP. Quick attempt to update the Makefile for both Alpine and Bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Jul 16, 2024
1 parent 62ea986 commit fdf3e27
Showing 1 changed file with 38 additions and 12 deletions.
50 changes: 38 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ all: 12dev 13dev 14dev 15dev 16dev prod
dev: 16dev

12dev:
docker build --build-arg PGTARGET=12 -t pgautoupgrade/pgautoupgrade:12-dev .
docker build -f Dockerfile.alpine --build-arg PGTARGET=12 -t pgautoupgrade/pgautoupgrade:12-dev . && \
docker build -f Dockerfile.bookworm --build-arg PGTARGET=12 -t pgautoupgrade/pgautoupgrade:12-dev-bookworm .

13dev:
docker build --build-arg PGTARGET=13 -t pgautoupgrade/pgautoupgrade:13-dev .
docker build -f Dockerfile.alpine --build-arg PGTARGET=13 -t pgautoupgrade/pgautoupgrade:13-dev . && \
docker build -f Dockerfile.bookworm --build-arg PGTARGET=13 -t pgautoupgrade/pgautoupgrade:13-dev-bookworm .

14dev:
docker build --build-arg PGTARGET=14 -t pgautoupgrade/pgautoupgrade:14-dev .
docker build -f Dockerfile.alpine --build-arg PGTARGET=14 -t pgautoupgrade/pgautoupgrade:14-dev . && \
docker build -f Dockerfile.bookworm --build-arg PGTARGET=14 -t pgautoupgrade/pgautoupgrade:14-dev-bookworm .

15dev:
docker build --build-arg PGTARGET=15 -t pgautoupgrade/pgautoupgrade:15-dev .
docker build -f Dockerfile.alpine --build-arg PGTARGET=15 -t pgautoupgrade/pgautoupgrade:15-dev . && \
docker build -f Dockerfile.bookworm --build-arg PGTARGET=15 -t pgautoupgrade/pgautoupgrade:15-dev-bookworm .

16dev:
docker build -t pgautoupgrade/pgautoupgrade:16-dev -t pgautoupgrade/pgautoupgrade:dev .
docker build -f Dockerfile.alpine -t pgautoupgrade/pgautoupgrade:16-dev -t pgautoupgrade/pgautoupgrade:dev . && \
docker build -f Dockerfile.bookworm -t pgautoupgrade/pgautoupgrade:16-dev-bookworm -t pgautoupgrade/pgautoupgrade:dev-bookworm .

prod:
docker build --build-arg PGTARGET=15 -t pgautoupgrade/pgautoupgrade:15-alpine3.20 -t pgautoupgrade/pgautoupgrade:15-alpine . && \
docker build -t pgautoupgrade/pgautoupgrade:16-alpine3.20 -t pgautoupgrade/pgautoupgrade:16-alpine -t pgautoupgrade/pgautoupgrade:latest .
docker build -f Dockerfile.alpine --build-arg PGTARGET=15 -t pgautoupgrade/pgautoupgrade:15-alpine3.20 -t pgautoupgrade/pgautoupgrade:15-alpine . && \
docker build -f Dockerfile.alpine -t pgautoupgrade/pgautoupgrade:16-alpine3.20 -t pgautoupgrade/pgautoupgrade:16-alpine -t pgautoupgrade/pgautoupgrade:latest .

attach:
docker exec -it pgauto /bin/bash
Expand All @@ -37,10 +42,25 @@ before:
pgautoupgrade/pgautoupgrade:dev

clean:
docker image rm --force pgautoupgrade/pgautoupgrade:dev pgautoupgrade/pgautoupgrade:12-dev pgautoupgrade/pgautoupgrade:13-dev \
pgautoupgrade/pgautoupgrade:14-dev pgautoupgrade/pgautoupgrade:15-dev pgautoupgrade/pgautoupgrade:16-dev \
pgautoupgrade/pgautoupgrade:15-alpine pgautoupgrade/pgautoupgrade:16-alpine \
pgautoupgrade/pgautoupgrade:15-alpine3.20 pgautoupgrade/pgautoupgrade:16-alpine3.20 pgautoupgrade/pgautoupgrade:latest && \
docker image rm --force pgautoupgrade/pgautoupgrade:dev \
pgautoupgrade/pgautoupgrade:dev-bookworm \
pgautoupgrade/pgautoupgrade:12-dev \
pgautoupgrade/pgautoupgrade:12-dev-bookworm \
pgautoupgrade/pgautoupgrade:13-dev \
pgautoupgrade/pgautoupgrade:13-dev-bookworm \
pgautoupgrade/pgautoupgrade:14-dev \
pgautoupgrade/pgautoupgrade:14-dev-bookworm \
pgautoupgrade/pgautoupgrade:15-dev \
pgautoupgrade/pgautoupgrade:15-dev-bookworm \
pgautoupgrade/pgautoupgrade:16-dev \
pgautoupgrade/pgautoupgrade:16-dev-bookworm \
pgautoupgrade/pgautoupgrade:15-alpine \
pgautoupgrade/pgautoupgrade:15-bookworm \
pgautoupgrade/pgautoupgrade:16-alpine \
pgautoupgrade/pgautoupgrade:16-bookworm \
pgautoupgrade/pgautoupgrade:15-alpine3.20 \
pgautoupgrade/pgautoupgrade:16-alpine3.20 \
pgautoupgrade/pgautoupgrade:latest && \
docker image prune -f && \
docker volume prune -f

Expand Down Expand Up @@ -70,11 +90,17 @@ up:

pushdev:
docker push pgautoupgrade/pgautoupgrade:12-dev && \
docker push pgautoupgrade/pgautoupgrade:12-dev-bookworm && \
docker push pgautoupgrade/pgautoupgrade:13-dev && \
docker push pgautoupgrade/pgautoupgrade:13-dev-bookworm && \
docker push pgautoupgrade/pgautoupgrade:14-dev && \
docker push pgautoupgrade/pgautoupgrade:14-dev-bookworm && \
docker push pgautoupgrade/pgautoupgrade:15-dev && \
docker push pgautoupgrade/pgautoupgrade:15-dev-bookworm && \
docker push pgautoupgrade/pgautoupgrade:16-dev && \
docker push pgautoupgrade/pgautoupgrade:dev
docker push pgautoupgrade/pgautoupgrade:16-dev-bookworm && \
docker push pgautoupgrade/pgautoupgrade:dev && \
docker push pgautoupgrade/pgautoupgrade:dev-bookworm

pushprod:
docker push pgautoupgrade/pgautoupgrade:15-alpine3.20 && \
Expand Down

0 comments on commit fdf3e27

Please sign in to comment.