-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 1.13 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
# syntax=docker/dockerfile:1
ARG UBUNTU_VERSION=24.04
FROM public.ecr.aws/docker/library/ubuntu:${UBUNTU_VERSION}
ARG USER_NAME=ruser
ARG USER_UID=1001
ARG USER_GID=1001
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
RUN \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/keep-cache
RUN \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends --no-install-suggests \
ca-certificates curl git r-base r-cran-devtools r-cran-docopt r-cran-yaml
RUN \
--mount=type=cache,target=/root/.cache \
--mount=type=bind,source=.,target=/mnt/host \
bash /mnt/host/install_clir.sh --root
HEALTHCHECK NONE
RUN \
groupadd --gid "${USER_GID}" "${USER_NAME}" \
&& useradd --uid "${USER_UID}" --gid "${USER_GID}" --shell /bin/bash --create-home "${USER_NAME}"
USER "${USER_NAME}"
ENTRYPOINT ["/usr/local/bin/clir"]