-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (33 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
43 lines (33 loc) · 1.37 KB
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
33
34
35
36
37
38
39
40
41
42
43
# ----------------------- Base image -----------------------
FROM ghcr.io/pixelgentechnologies/pixelatorr:sha-24de3e3 as build
ARG QUARTO_VERSION="1.5.54"
ARG GITHUB_PAT=
# Set the environment variable for the GitHub Personal Access Token
# This is needed to access private repositories during the build process
ENV GITHUB_PAT=${GITHUB_PAT}
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* &&\
export QUARTO_VERSION=${QUARTO_VERSION} &&\
mkdir -p /opt/quarto/${QUARTO_VERSION} &&\
curl -o quarto.tar.gz -L "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" &&\
tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 &&\
rm quarto.tar.gz
ENV PATH=/opt/quarto/$QUARTO_VERSION/bin:$PATH
WORKDIR /workspace
# Install dependencies
COPY DESCRIPTION /workspace/
RUN R -e "pak::pak()"
# Move the quarto files into the container
COPY inst /workspace/inst
# Install the package
COPY R /workspace/R
COPY NAMESPACE /workspace/NAMESPACE
RUN R -e "devtools::install()"
# Setup runable entrypoint
COPY experiment-summary /usr/local/bin/experiment-summary
# -----------------------Test image -----------------------
# Based on base image
FROM build AS test
WORKDIR /workspace
# Copy test data and package
COPY . /workspace
COPY tests/testdata /workspace/testdata