forked from mrako/wait-for
-
Notifications
You must be signed in to change notification settings - Fork 410
/
Dockerfile
38 lines (28 loc) · 652 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#################
# Base layer #
#################
FROM alpine:edge as runtime-base
# Install all dependencies
RUN apk add --no-cache bash nmap-ncat wget
WORKDIR /app
#################
# Test image #
#################
FROM runtime-base as test-env
# Install Node.js
RUN apk add --no-cache nodejs npm
# Install all Node dependencies
COPY package.json /app/
COPY package-lock.json /app/
RUN npm ci
# Copy source code
COPY . /app/
# Perform tests when running this test-env container
CMD npm test
#################
# Runtime image #
#################
FROM runtime-base as runtime
COPY ./wait-for .
ENTRYPOINT ["./wait-for"]
CMD ["--help"]