Skip to content

Commit 02fdd9b

Browse files
committed
Add docker information to the docs
1 parent c89f6c7 commit 02fdd9b

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ For example, your application "MySuperApp" uses MongoDB, Postgres and MySql (wow
2121
FROM alpine
2222

2323
## 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
2729

2830
## Add your application to the docker image
2931
ADD MySuperApp.sh /MySuperApp.sh
@@ -82,13 +84,17 @@ When using [distroless](https://github.com/GoogleContainerTools/distroless) or b
8284

8385
```dockerfile
8486
FROM golang
85-
RUN wget -o /wait https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait
87+
8688
COPY myApp /app
8789
WORKDIR /app
8890
RUN go build -o /myApp -ldflags '-s -w -extldflags -static' ./...
8991
92+
## ----------------
93+
9094
FROM scratch
91-
COPY --from=0 /wait /wait
95+
96+
COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest/wait /wait
97+
9298
COPY --from=0 /myApp /myApp
9399
ENV WAIT_COMMAND="/myApp arg1 argN..."
94100
ENTRYPOINT ["/wait"]
@@ -108,6 +114,7 @@ The behaviour of the wait utility can be configured with the following environme
108114
- _WAIT_AFTER_: number of seconds to wait (sleep) once all the hosts/paths are available
109115
- _WAIT_SLEEP_INTERVAL_: number of seconds to sleep between retries. The default is 1 second.
110116

117+
111118
## Supported architectures
112119

113120
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
122129
https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/{{executable_name}}
123130

124131

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
126139

127140
The simplest way of getting the _wait_ executable is to download it from
128141

129142
[https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait](https://github.com/ufoscout/docker-compose-wait/releases/download/{{VERSION}}/wait)
130143

144+
or to use one of the pre-built docker images.
145+
131146
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.
132147

133148
As it has no external dependencies, an being written in the mighty [rust](https://www.rust-lang.org)

0 commit comments

Comments
 (0)