Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBellew committed May 26, 2024
1 parent 2ad85af commit d460756
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ci-build-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ set -e
CACHE_KEY=$1

# Ensure the Docker buildx builder is set up
docker buildx create --use --name mybuilder
# docker buildx create --use --name mybuilder

# Load the cache from the GitHub Actions cache
docker load -i /tmp/docker_cache_$CACHE_KEY.tar || true
# # Load the cache from the GitHub Actions cache
# docker load -i /tmp/docker_cache_$CACHE_KEY.tar || true

if [ -f /tmp/docker_cache_$CACHE_KEY.tar ]; then
docker load -i /tmp/docker_cache_$CACHE_KEY.tar
fi

#cd postgres
#./build.sh
Expand Down
2 changes: 1 addition & 1 deletion postgres/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM moby/buildkit:buildx-stable-1
FROM alpine:3.19

# Install necessary packages
RUN apk add --no-cache \
Expand Down
2 changes: 1 addition & 1 deletion postgres/build-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sed -i 's/amd64 | arm64 | ppc64el | s390x/dummy/' Dockerfile
sed -i 's/apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"/apt-get source "postgresql-$PG_MAJOR=$PG_VERSION"; cd postgresql-*; sed -i '\''$a override_dh_strip:\\n\\t# Do nothing, which means dont strip the symbols\\n'\'' \/usr\/share\/postgresql-common\/server\/postgresql.mk; sed -i '\''s|$(CFLAGS)|-ggdb -Og -g3 -fno-omit-frame-pointer|'\'' \/usr\/share\/postgresql-common\/server\/postgresql.mk; cd ..; apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"/' Dockerfile

# Build the PostgreSQL image with debug symbols
docker buildx build --cache-from type=local,src=/tmp/$CACHE_KEY --cache-to type=local,dest=/tmp/$CACHE_KEY,mode=max -t pg-ferret-postgres-16:latest .
docker build --cache-from type=local,src=/tmp/$CACHE_KEY --cache-to type=local,dest=/tmp/$CACHE_KEY,mode=max -t pg-ferret-postgres-16:latest .

0 comments on commit d460756

Please sign in to comment.