-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathDockerfile.ubuntu2204
24 lines (21 loc) · 1.11 KB
/
Dockerfile.ubuntu2204
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Tag from https://hub.docker.com/_/ubuntu/
FROM ubuntu:22.04 as build
# Install required tools:
# - ca-certificates installs necessary certificates to use cURL with HTTPS websites
# - curl is used to download the runtime tar.gz
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
ARG RSC_VERSION=2024.11.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir -p /rsc-staging && \
RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') && \
RSC_VERSION_CLEAN=$(echo $RSC_VERSION | sed -r 's/([0-9]+\.[0-9]+).*/\1/') && \
curl -fsSL -o /rsc-staging/rstudio-connect-runtime.tar.gz "https://cdn.rstudio.com/connect/${RSC_VERSION_CLEAN}/rstudio-connect-runtime-${RSC_VERSION_URL}.tar.gz" && \
mkdir -p /opt/rstudio-connect-runtime && \
tar -C /opt/rstudio-connect-runtime -xf /rsc-staging/rstudio-connect-runtime.tar.gz && \
chmod -R 755 /opt/rstudio-connect-runtime && \
rm -rf /rsc-staging
COPY --chmod=755 entrypoint.sh /usr/local/bin/entrypoint.sh
CMD ["/usr/local/bin/entrypoint.sh"]