Skip to content

Commit e1dce8b

Browse files
author
bashj79
committed
Reduce docker image size
1 parent 76d45a3 commit e1dce8b

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
FROM bbyars/mountebank:2.4.0
1+
FROM alpine:3.13.2
22

3-
ENV MB_GRAPHQL_VERSION=0.1.9
4-
RUN npm install -g mb-graphql@${MB_GRAPHQL_VERSION} --production
3+
ENV NODE_VERSION=14.16.0-r0
4+
ENV MOUNTEBANK_VERSION=2.4.0
5+
ENV MB_GRAPHQL_VERSION=0.1.10
56

6-
RUN mkdir /mb-graphql
7-
COPY protocols.json /mb-graphql
7+
RUN apk update \
8+
&& apk add --no-cache nodejs=${NODE_VERSION} npm=${NODE_VERSION} \
9+
&& npm install -g mountebank@${MOUNTEBANK_VERSION} mb-graphql@${MB_GRAPHQL_VERSION} --production \
10+
&& npm cache clean --force 2>/dev/null \
11+
&& apk del npm \
12+
&& rm -rf /tmp/npm*
813

9-
WORKDIR /app
14+
COPY protocols.json .
1015

1116
EXPOSE 2525
1217

13-
ENTRYPOINT ["node", "bin/mb"]
14-
CMD ["start", "--protofile", "/mb-graphql/protocols.json"]
18+
ENTRYPOINT ["mb"]
19+
CMD ["start", "--protofile", "protocols.json"]

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mb-graphql",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "mountebank test doubles for GraphQL",
55
"author": "bashj79",
66
"license": "MIT",

0 commit comments

Comments
 (0)