-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile.base
More file actions
58 lines (43 loc) · 1.39 KB
/
Dockerfile.base
File metadata and controls
58 lines (43 loc) · 1.39 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
44
45
46
47
48
49
50
51
52
53
# Dockerfile.base
FROM ubuntu:latest AS base
LABEL org.opencontainers.image.authors="pierre@spinorama.org" version="0.4"
# Install necessary packages
RUN apt-get update && apt-get install -y --no-install-recommends \
dash \
build-essential \
g++ \
libc-bin \
locales \
openssh-server \
python3.12 \
python3.12-venv \
python3.12-dev \
python3-pip \
imagemagick \
wget \
curl \
git \
pkg-config \
libssl-dev && \
rm -rf /var/lib/apt/lists/*
# Install Node.js 22.x (needed by vite and other tooling)
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get update && apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Install Rust (stable) via rustup to ensure a recent toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH=/root/.cargo/bin:$PATH
# Set locale
RUN localedef -f UTF-8 -i en_US en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Create user 'spin' with password 'spin'
RUN useradd -m -s /bin/bash spin && echo 'spin:spin' | chpasswd
# Configure SSH server
RUN mkdir /var/run/sshd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config && \
sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
# Expose SSH port
EXPOSE 22
# Start SSH service
CMD ["/usr/sbin/sshd", "-D"]