-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
77 lines (65 loc) · 2.05 KB
/
Copy pathDockerfile.dev
File metadata and controls
77 lines (65 loc) · 2.05 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# RT Container Runtime - Development Environment
# Ubuntu-based container dengan Linux tools untuk namespace dan cgroup operations
FROM ubuntu:24.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install essential packages untuk container runtime development
RUN apt-get update && apt-get install -y \
# Core system tools untuk namespace dan cgroup operations
util-linux \
coreutils \
procps \
psmisc \
# Network tools untuk container networking
iproute2 \
iputils-ping \
iptables \
# Essential container tools
busybox-static \
# User namespace support untuk rootless mode
uidmap \
# Basic development tools
bash \
curl \
git \
vim \
# Development dan debugging tools
strace \
gdb \
# Testing tools
bats \
shellcheck \
# JSON processing untuk container metadata
jq \
sudo \
# System monitoring tools
htop \
tree \
&& rm -rf /var/lib/apt/lists/*
# Create directories untuk container runtime
RUN mkdir -p /tmp/containers \
&& mkdir -p /workspace/tests \
&& mkdir -p /workspace/docs
# Setup proper permissions untuk development
RUN chmod 755 /tmp/containers
# Enable user namespaces untuk rootless mode
RUN echo 'kernel.unprivileged_userns_clone=1' >> /etc/sysctl.conf
# Create non-root user untuk development (optional)
RUN useradd -m -s /bin/bash -u 1001 developer \
&& usermod -aG sudo developer \
&& echo "developer ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Setup subuid/subgid untuk rootless containers
RUN echo "developer:100000:65536" >> /etc/subuid \
&& echo "developer:100000:65536" >> /etc/subgid \
&& echo "root:200000:65536" >> /etc/subuid \
&& echo "root:200000:65536" >> /etc/subgid
# Set working directory
WORKDIR /workspace
# Default user (can be overridden)
USER root
# Keep container running
CMD ["/bin/bash"]
# Labels untuk identification
LABEL maintainer="RT Development Team"
LABEL description="Development environment untuk RT Container Runtime"
LABEL version="1.0"