-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile.slim
68 lines (63 loc) · 2.37 KB
/
Dockerfile.slim
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
# Dockerfile.slim
# version: 24.11.1
#
# Riverbed SteelScript, https://github.com/riverbed/steelscript
#
# Usage
#
# # Build
#
# docker build --tag steelscript.slim:latest -f Dockerfile.slim .
#
# # Run
#
# docker run --rm steelscript.slim:latest steel
# Use a slim image
FROM python:3.13-slim
LABEL org.opencontainers.image.authors="Riverbed Community"
LABEL org.opencontainers.image.source="https://github.com/riverbed/steelscript"
LABEL org.opencontainers.image.title="SteelScript - slim image"
LABEL org.opencontainers.image.version="24.11.1"
RUN set -ex && \
# Install deps for build
buildDeps=' \
git \
gcc \
libpcap-dev \
' && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y $buildDeps --no-install-recommends && \
rm -rf /var/lib/apt/lists/* && \
# Install SteelScript and modules, latest versions
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
git+https://github.com/riverbed/steelscript \
git+https://github.com/riverbed/steelscript-netprofiler \
git+https://github.com/riverbed/steelscript-wireshark \
git+https://github.com/riverbed/steelscript-cmdline \
git+https://github.com/riverbed/steelscript-scc \
git+https://github.com/riverbed/steelscript-appresponse \
git+https://github.com/riverbed/steelscript-netim \
git+https://github.com/riverbed/steelscript-client-accelerator-controller \
git+https://github.com/riverbed/steelscript-steelhead \
git+https://github.com/riverbed/steelscript-packets && \
# Cleanup, purging build deps
distroExtra=' \
perl \
linux-libc-dev \
' && \
apt-get remove -y --purge --autoremove $buildDeps $distroExtra && \
apt-get autoremove && \
apt-get clean && \
rm -rf ~/.cache
# Create a non-root user and group
ARG USER_ID=1000
ARG GROUP_ID=$USER_ID
RUN groupadd --gid $GROUP_ID steelscript && useradd --create-home --home-dir /steelscript --gid $GROUP_ID --uid $USER_ID steelscript
USER steelscript
# Create SteelScript workspace
RUN set -ex && steel mkworkspace -d /steelscript/workspace
WORKDIR /steelscript/workspace
# Configure container startup
CMD ["/bin/bash"]