forked from pelican-eggs/yolks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
29 lines (25 loc) · 1.25 KB
/
Dockerfile
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
FROM --platform=$TARGETOS/$TARGETARCH mongo:7-jammy
LABEL author="Silly Development" maintainer="[email protected]"
## install nodejs 20
RUN apt update && apt install --no-install-recommends -y curl apt-transport-https ca-certificates gnupg \
&& mkdir -p /usr/share/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt update && apt install -y nodejs \
&& npm install -g npm@latest \
## install bastion reqs
&& apt install -y python3 build-essential git libtool netcat ffmpeg iproute2 tzdata tini \
## add container user
&& useradd -d /home/container -m container -s /bin/bash
RUN rm -rf /usr/bin/dd \
&& rm -rf /usr/bin/fallocate \
&& rm -rf /usr/bin/truncate \
&& rm -rf /usr/bin/xfs_mkfile
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]