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
# Dockerfile.debian - Debian環境でのCLIテスト
# CLI Testing Specialist Agent v1.1.0
FROM debian:12-slim
LABEL maintainer="CLI Testing Specialist"
LABEL description="Debian environment for CLI testing"
# タイムゾーン設定(対話防止)
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
# 必要なパッケージのインストール
RUN apt-get update && apt-get install -y \
bash \
coreutils \
findutils \
grep \
sed \
jq \
curl \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# BATSインストール
RUN git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core \
&& cd /tmp/bats-core \
&& ./install.sh /usr/local \
&& rm -rf /tmp/bats-core
# BATS補助ライブラリ
RUN git clone --depth 1 https://github.com/bats-core/bats-support.git /opt/bats-support \
&& git clone --depth 1 https://github.com/bats-core/bats-assert.git /opt/bats-assert \
&& git clone --depth 1 https://github.com/bats-core/bats-file.git /opt/bats-file
# 作業ディレクトリ
WORKDIR /test
# テストディレクトリ作成
RUN mkdir -p /test-cli /test-suite /test-output
# BATS補助ライブラリのロードパス
ENV BATS_SUPPORT_PATH=/opt/bats-support
ENV BATS_ASSERT_PATH=/opt/bats-assert
ENV BATS_FILE_PATH=/opt/bats-file
# デフォルトコマンド
CMD ["/bin/bash"]