-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfileRuntime
87 lines (75 loc) · 5.59 KB
/
DockerfileRuntime
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
################################################################################
# WARNING: This file has been auto-generated. DO NOT EDIT: WARNING
# Created on 2020-05-09T15:30:44+1000, using template:DockerfileRuntime.tmpl and json:gearbox.json
# Referenced Docker container for docker-postgresql based off gearboxworks/gearbox-base:alpine-3.11 with postgres:12.2-alpine overlayed.
ARG VERSION=12.2
# 1. First reference the gearbox-base image.
FROM gearboxworks/gearbox-base:alpine-3.11 as gearbox-base
# 2. Next reference the third party image.
FROM postgres:12.2-alpine
ARG VERSION
ARG GEARBOX_ENTRYPOINT
ARG GEARBOX_ENTRYPOINT_ARGS
USER root
# 3. Copy the build directory over from gearbox-base image.
COPY --from=gearbox-base /etc/gearbox /etc/gearbox
# 4. Set up env variables.
MAINTAINER Gearbox Team <team@gearbox.works>
ENV GEARBOX_CONTAINER_NAME "docker-postgresql"
ENV GEARBOX_CONTAINER_VERSION ${VERSION}
ENV GEARBOX_ENTRYPOINT ${GEARBOX_ENTRYPOINT}
ENV GEARBOX_ENTRYPOINT_ARGS ${GEARBOX_ENTRYPOINT_ARGS}
LABEL gearbox.json='{"schema": "gear-1","meta": {"state": "production","organization": "gearboxworks","name": "postgresql","label": "Postgresql","maintainer": "Gearbox Team <team@gearbox.works>","class": "dbserver","refurl": "https://www.postgresql.org/"},"build": {"ports": {"unknown": "8080","postgres": "5432"},"run": "","args": "-d postgres","env": {"PGDATA": "/var/lib/postgresql/data","POSTGRES_PASSWORD": "password","POSTGRES_USER": "gearbox"},"network": "--network gearboxnet","volumes": "","restart": "--restart no"},"run": {"commands": {"default": "/usr/local/bin/psql","psql": "/usr/local/bin/psql","clusterdb": "/usr/local/bin/clusterdb","createdb": "/usr/local/bin/createdb","createlang": "/usr/local/bin/createlang","createuser": "/usr/local/bin/createuser","dropdb": "/usr/local/bin/dropdb","droplang": "/usr/local/bin/droplang","dropuser": "/usr/local/bin/dropuser","ecpg": "/usr/local/bin/ecpg","initdb": "/usr/local/bin/initdb","pg_archivecleanup": "/usr/local/bin/pg_archivecleanup","pg_basebackup": "/usr/local/bin/pg_basebackup","pg_config": "/usr/local/bin/pg_config","pg_controldata": "/usr/local/bin/pg_controldata","pg_ctl": "/usr/local/bin/pg_ctl","pg_dump": "/usr/local/bin/pg_dump","pg_dumpall": "/usr/local/bin/pg_dumpall","pg_isready": "/usr/local/bin/pg_isready","pg_receivexlog": "/usr/local/bin/pg_receivexlog","pg_recvlogical": "/usr/local/bin/pg_recvlogical","pg_resetxlog": "/usr/local/bin/pg_resetxlog","pg_restore": "/usr/local/bin/pg_restore","pg_standby": "/usr/local/bin/pg_standby","pg_test_fsync": "/usr/local/bin/pg_test_fsync","pg_test_timing": "/usr/local/bin/pg_test_timing","pg_upgrade": "/usr/local/bin/pg_upgrade","pg_xlogdump": "/usr/local/bin/pg_xlogdump","pgbench": "/usr/local/bin/pgbench","postmaster": "/usr/local/bin/postmaster","reindexdb": "/usr/local/bin/reindexdb","vacuumdb": "/usr/local/bin/vacuumdb","vacuumlo": "/usr/local/bin/vacuumlo"}},"project": {},"extensions": {},"versions": {"10.12": {"majorversion": "10","latest": false,"ref": "postgres:10.12-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"11.7": {"majorversion": "11","latest": false,"ref": "postgres:11.7-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"12.2": {"majorversion": "12","latest": true,"ref": "postgres:12.2-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"9.4.26": {"majorversion": "9.4","latest": false,"ref": "postgres:9.4.26-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"9.5.21": {"majorversion": "9.5","latest": false,"ref": "postgres:9.5.21-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"9.6.17": {"majorversion": "9.6","latest": false,"ref": "postgres:9.6.17-alpine","base": "gearboxworks/gearbox-base:alpine-3.11"},"": {}}}'
LABEL gearbox.version='12.2'
ENV GEARBOX_VERSION "12.2"
LABEL container.class="dbserver"
ENV GEARBOX_CLASS "dbserver"
LABEL container.label="Postgresql"
ENV GEARBOX_LABEL "Postgresql"
LABEL container.maintainer="Gearbox Team <team@gearbox.works>"
ENV GEARBOX_MAINTAINER "Gearbox Team <team@gearbox.works>"
LABEL container.name="postgresql"
ENV GEARBOX_NAME "postgresql"
LABEL container.organization="gearboxworks"
ENV GEARBOX_ORGANIZATION "gearboxworks"
LABEL container.refurl="https://www.postgresql.org/"
ENV GEARBOX_REFURL "https://www.postgresql.org/"
LABEL container.state="production"
ENV GEARBOX_STATE "production"
LABEL container.args="-d postgres"
ENV GEARBOX_ARGS "-d postgres"
# SKIP env
LABEL container.network="--network gearboxnet"
ENV GEARBOX_NETWORK "--network gearboxnet"
LABEL container.ports="map[postgres:5432 unknown:8080]"
ENV GEARBOX_PORTS "map[postgres:5432 unknown:8080]"
LABEL container.restart="--restart no"
ENV GEARBOX_RESTART "--restart no"
LABEL container.run=""
ENV GEARBOX_RUN ""
LABEL container.volumes=""
ENV GEARBOX_VOLUMES ""
LABEL container.base="gearboxworks/gearbox-base:alpine-3.11"
ENV GEARBOX_BASE "gearboxworks/gearbox-base:alpine-3.11"
LABEL container.latest="true"
ENV GEARBOX_LATEST "true"
LABEL container.majorversion="12"
ENV GEARBOX_MAJORVERSION "12"
LABEL container.ref="postgres:12.2-alpine"
ENV GEARBOX_REF "postgres:12.2-alpine"
ENV PGDATA "/var/lib/postgresql/data"
ENV POSTGRES_PASSWORD "password"
ENV POSTGRES_USER "gearbox"
# 5. Now copy the local files specific to this container.
COPY build /etc/gearbox
COPY versions/${VERSION}/build /etc/gearbox
# 6. Run the base.sh script to set everything up.
RUN /bin/sh /etc/gearbox/build/base.sh
# 7. Run the postgresql.sh script to set everything up.
RUN /bin/sh /etc/gearbox/build/postgresql.sh
# 8. Expose ports.
EXPOSE 22 9970 5432 8080
WORKDIR /home/gearbox/projects
CMD ["/init"]
# END
################################################################################