Skip to content

Commit 54f46e5

Browse files
authored
Merge pull request #260 from infosiftr/docker-entrypoint.sh
Put "docker-entrypoint.sh" in PATH (with backwards-compat symlink)
2 parents e430162 + fc67676 commit 54f46e5

File tree

12 files changed

+36
-36
lines changed

12 files changed

+36
-36
lines changed

9.2/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

9.2/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

9.3/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

9.3/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

9.4/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

9.4/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

9.5/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

9.5/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

9.6/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

9.6/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

Dockerfile-alpine.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ ENV PGDATA /var/lib/postgresql/data
124124
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
125125
VOLUME /var/lib/postgresql/data
126126

127-
COPY docker-entrypoint.sh /
128-
129-
ENTRYPOINT ["/docker-entrypoint.sh"]
127+
COPY docker-entrypoint.sh /usr/local/bin/
128+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
129+
ENTRYPOINT ["docker-entrypoint.sh"]
130130

131131
EXPOSE 5432
132132
CMD ["postgres"]

Dockerfile-debian.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ENV PGDATA /var/lib/postgresql/data
6161
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
6262
VOLUME /var/lib/postgresql/data
6363

64-
COPY docker-entrypoint.sh /
65-
66-
ENTRYPOINT ["/docker-entrypoint.sh"]
64+
COPY docker-entrypoint.sh /usr/local/bin/
65+
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
66+
ENTRYPOINT ["docker-entrypoint.sh"]
6767

6868
EXPOSE 5432
6969
CMD ["postgres"]

0 commit comments

Comments
 (0)