Skip to content

Commit 4603180

Browse files
committed
build process added
1 parent 3b2568d commit 4603180

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
FROM alpine
22

3+
ARG pg_version
4+
35
# postgresql for pg_dump
4-
RUN apk --no-cache add postgresql
6+
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.4/main' >> /etc/apk/repositories
7+
8+
RUN echo ${pg_version}; apk --no-cache add postgresql-client=${pg_version}
59

610
# python for aws-cli, for s3 uploading
711
RUN apk --no-cache add python py-pip && \

build_push.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#! /bin/sh
2+
3+
builds=$(echo '
4+
9.6.3 9.6.3-r0
5+
9.6 9.6.3-r0
6+
9 9.6.3-r0
7+
latest 9.6.3-r0
8+
9.5.7 9.5.7-r0
9+
9.5 9.5.7-r0
10+
' | tr -s ' ')
11+
12+
IFS=$'\n'
13+
for build in $builds; do
14+
tag=$(echo $build | cut -d ' ' -f 1 )
15+
pgVersion=$(echo $build | cut -d ' ' -f 2)
16+
17+
echo docker build --tag bluedrop360/postgres-dump-to-s3:$tag --build-arg pg_version="$pgVersion" .
18+
eval docker build --tag bluedrop360/postgres-dump-to-s3:$tag --build-arg pg_version="$pgVersion" .
19+
echo docker push bluedrop360/postgres-dump-to-s3:$tag
20+
eval docker push bluedrop360/postgres-dump-to-s3:$tag
21+
done

0 commit comments

Comments
 (0)