Skip to content

Commit 5209e4e

Browse files
committed
fix(dockerfile): run npm link
Fixes #1394. The currently built container image works fine if you want to invoke artillery through a single docker command. But if you want to run multiple artillery commands in the same container instance, or if you want to use Artillery's container image as a base layer, then you ran into issues such #1394. The issue us that the executable in the path is named `run` instead of `artillery`. To address this while maintain compatibility for any users depending on the existing executable we can run an `npm install` which will setup artillery as if it had been installed globally.
1 parent fef25ed commit 5209e4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ COPY package*.json ./
77
RUN npm --ignore-scripts --production install
88

99
COPY . ./
10+
RUN npm link
11+
12+
# keep for backwards compatibility
1013
ENV PATH="/home/node/artillery/bin:${PATH}"
1114

12-
ENTRYPOINT ["/home/node/artillery/bin/run"]
15+
ENTRYPOINT ["/usr/local/bin/artillery"]

0 commit comments

Comments
 (0)