@@ -21,9 +21,11 @@ For example, your application "MySuperApp" uses MongoDB, Postgres and MySql (wow
21
21
FROM alpine
22
22
23
23
# # Add the wait script to the image
24
- # # This is the default executable for the x86_64 architecture, other architectures are supported too
25
- ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.11.0/wait /wait
26
- RUN chmod +x /wait
24
+ COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest/wait /wait
25
+
26
+ # # Otherwise you can directly download the executable from github releases. E.g.:
27
+ # ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.11.0/wait /wait
28
+ # RUN chmod +x /wait
27
29
28
30
# # Add your application to the docker image
29
31
ADD MySuperApp.sh /MySuperApp.sh
@@ -82,13 +84,17 @@ When using [distroless](https://github.com/GoogleContainerTools/distroless) or b
82
84
83
85
` ` ` dockerfile
84
86
FROM golang
85
- RUN wget -o /wait https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait
87
+
86
88
COPY myApp /app
87
89
WORKDIR /app
88
90
RUN go build -o /myApp -ldflags '-s -w -extldflags -static' ./...
89
91
92
+ ## ----------------
93
+
90
94
FROM scratch
91
- COPY --from=0 /wait /wait
95
+
96
+ COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest/wait /wait
97
+
92
98
COPY --from=0 /myApp /myApp
93
99
ENV WAIT_COMMAND="/myApp arg1 argN..."
94
100
ENTRYPOINT ["/wait"]
@@ -108,6 +114,7 @@ The behaviour of the wait utility can be configured with the following environme
108
114
- _WAIT_AFTER_ : number of seconds to wait (sleep) once all the hosts/paths are available
109
115
- _WAIT_SLEEP_INTERVAL_ : number of seconds to sleep between retries. The default is 1 second.
110
116
117
+
111
118
# # Supported architectures
112
119
113
120
From release 2.11.0, the following executables are available for download :
@@ -122,12 +129,20 @@ To use any of these executables, simply replace the executable name in the downl
122
129
https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/{{executable_name}}
123
130
124
131
125
- # # Using on non-linux systems
132
+ # # Docker images
133
+
134
+ Official docker images based on `scratch` can be found here :
135
+ https://github.com/users/ufoscout/packages/container/package/docker-compose-wait
136
+
137
+
138
+ # # Using on other systems
126
139
127
140
The simplest way of getting the _wait_ executable is to download it from
128
141
129
142
[https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait](https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait)
130
143
144
+ or to use one of the pre-built docker images.
145
+
131
146
If you need it for an architecture for which a pre-built file is not available, you should clone this repository and build it for your target.
132
147
133
148
As it has no external dependencies, an being written in the mighty [rust](https://www.rust-lang.org)
0 commit comments