-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 1014 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 1014 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
# 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 .
# Pull any base image that includes python3
FROM python:3.12
COPY --from=gotap-builder /gotap/gotap /usr/local/bin/gotap
RUN chmod +x /usr/local/bin/gotap
# Do anything you need to install tool dependencies here
RUN echo "Replace this line with a tool"
# create the tool input structure
RUN mkdir /in
COPY ./in /in
RUN mkdir /out
RUN mkdir /src
COPY ./src /src
# Generate parameter bindings from tool.yml at build time (replaces json2args)
WORKDIR /src
RUN gotap generate --spec-file=tool.yml --target=python --output=parameters.py
# 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"]