Skip to content

Commit 4c78b86

Browse files
Ben Iofelbenwaffle
authored andcommitted
Break the docker build if a script fails to apply
1 parent a18c71a commit 4c78b86

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ FROM flowdocker/postgresql:0.1.63
33
ADD . /opt/schema
44
WORKDIR /opt/schema
55

6-
RUN echo "set -x #echo on" >> /opt/run.sh
7-
RUN echo "service postgresql start" >> /opt/run.sh
8-
RUN echo "sh /opt/schema/install.sh" >> /opt/run.sh
9-
RUN echo "service postgresql stop" >> /opt/run.sh
10-
11-
RUN sh /opt/run.sh
6+
RUN service postgresql start && \
7+
./install.sh && \
8+
service postgresql stop
129

1310
USER "postgres"
1411
CMD ["/usr/lib/postgresql/11/bin/postgres", "-i", "-D", "/var/lib/postgresql/11/main"]

0 commit comments

Comments
 (0)