-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 951 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 951 Bytes
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
# Build gotap from source, then discard Go
FROM golang:1.25-alpine AS gotap-builder
RUN apk add --no-cache git
ARG GOTAP_VERSION=main
RUN git clone --depth 1 --branch ${GOTAP_VERSION} https://github.com/tool-spec/gotap.git /gotap && \
cd /gotap && go build -o gotap .
FROM node:18.12.1-buster
COPY --from=gotap-builder /gotap/gotap /usr/local/bin/gotap
RUN chmod +x /usr/local/bin/gotap
# create the tool input structure
RUN mkdir /in
COPY ./in /in
RUN mkdir /out
RUN mkdir /src
COPY ./src /src
COPY ./package.json /src/package.json
WORKDIR /src
# install tsx to run TypeScript
RUN npm install tsx
# Generate parameter bindings from tool.yml at build time
RUN gotap generate --spec-file=tool.yml --target=node-ts --output=parameters.ts
# copy the citation file - looks funny to make COPY not fail if the file is not there
COPY ./CITATION.cf[f] /src/CITATION.cff
WORKDIR /src
CMD ["gotap", "run", "foobar", "--input-file", "/in/input.json"]