Skip to content

Commit cc6e76b

Browse files
committed
Update
1 parent 7571a8b commit cc6e76b

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

src/commands/test.js

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,38 @@ module.exports = {
4848
}
4949

5050
// TODO: Move these in separate file (in a function maybe)
51-
let contents = `FROM ubuntu:20.04
51+
let contents = `# I'll try to run it on alpine
52+
FROM ubuntu:20.04
53+
54+
# Not sure if this ENV declaration is necessary
5255
ENV ARGS=""
56+
57+
# Install necessary packages
5358
RUN apt update
5459
RUN apt install -y nodejs
5560
RUN apt install -y npm
56-
COPY ./ ./
57-
RUN npm run codegen
58-
RUN npm run build
61+
RUN apt install -y git
5962
RUN apt install -y postgresql
6063
RUN apt install -y curl
61-
RUN apt-get update && apt-get -y install cmake protobuf-compiler
62-
RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/${version || "0.2.2a"}/binary-linux-20
63-
RUN mv binary-linux-20 matchstick
64-
RUN chmod a+x matchstick
65-
CMD ./matchstick \${ARGS}`
64+
RUN npm install -g @graphprotocol/graph-cli
65+
66+
# Download the latest linux binary
67+
RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/0.2.2a/binary-linux-20
68+
# Make it executable
69+
RUN chmod a+x binary-linux-20
70+
71+
# Create a matchstick dir where the host will be copied
72+
RUN mkdir matchstick
73+
WORKDIR matchstick
74+
75+
# Copy host to /matchstick
76+
COPY ../ .
77+
78+
RUN graph codegen
79+
RUN graph build
80+
81+
CMD ../binary-linux-20 \${ARGS}
82+
`
6683

6784
let dir = 'tests/.docker';
6885

0 commit comments

Comments
 (0)