Skip to content

Commit 2127a8e

Browse files
committed
alter test dockerfile
1 parent 6ac93e8 commit 2127a8e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test.Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
FROM alpine:3.16
22
WORKDIR /tmp
33
RUN apk add build-base
4-
RUN printf 'int main(){ exit(getpid()-1); }' > /tmp/is_pid_1.c \
5-
&& gcc -w -static -o /is_pid_1 /tmp/is_pid_1.c
4+
RUN printf '#include <stdio.h>' > /tmp/hello.c \
5+
&& printf 'int main() { printf("Hello World"); return 0; }' > /tmp/hello.c \
6+
&& gcc -w -static -o /hello /tmp/hello.c
67

78
FROM scratch
8-
COPY --from=0 /is_pid_1 /is_pid_1
9+
COPY --from=0 /hello /hello
910
COPY ./target/x86_64-unknown-linux-musl/release/wait /wait
1011
ENV WAIT_LOGGER_LEVEL=off
11-
ENV WAIT_COMMAND=/is_pid_1
12-
ENTRYPOINT ["/wait"]
12+
ENV WAIT_COMMAND=/hello
13+
ENTRYPOINT ["/wait"]

0 commit comments

Comments
 (0)