-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (25 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
28 lines (25 loc) · 1.01 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
FROM ubuntu:latest AS base
ENV DEBIAN_FRONTEND=noninteractive
RUN userdel -r ubuntu && \
groupadd -g 1000 lean && \
useradd -m -u 1000 -g lean lean
WORKDIR /src
ADD https://deb.nodesource.com/setup_lts.x /src/setup_nodesource.sh
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean && \
bash ./setup_nodesource.sh && \
apt-get install -y --no-install-recommends ca-certificates curl git tini gosu zstd nodejs
ARG LEAN_TOOLCHAIN=stable
COPY ./releases.mjs /src/releases.mjs
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
node ./releases.mjs download ${LEAN_TOOLCHAIN} && \
mkdir /opt/lean && \
tar -xvf ./lean-*.tar.* -C /opt/lean --strip-components=1 && \
rm -rf /src
ENV PATH=/opt/lean/bin:$PATH
ENV UID=1000 USER=lean \
GID=1000 GROUP=lean \
XDG_CACHE_HOME=/var/cache/lean
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]