From 7e1c8d19cdabb03d9af8043b5b96dbf70c885c5a Mon Sep 17 00:00:00 2001 From: Atsushi Abe Date: Thu, 1 Jan 2026 18:49:19 +0900 Subject: [PATCH] feat: support dev container env - Rocky9 - Ubuntu 24.04 --- .devcontainer/rocky9/Dockerfile | 54 ++++++++++++++++++++++ .devcontainer/rocky9/devcontainer.json | 18 ++++++++ .devcontainer/ubuntu2404/Dockerfile | 43 +++++++++++++++++ .devcontainer/ubuntu2404/devcontainer.json | 21 +++++++++ .gitignore | 2 + AGENTS.md | 4 +- 6 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/rocky9/Dockerfile create mode 100644 .devcontainer/rocky9/devcontainer.json create mode 100644 .devcontainer/ubuntu2404/Dockerfile create mode 100644 .devcontainer/ubuntu2404/devcontainer.json diff --git a/.devcontainer/rocky9/Dockerfile b/.devcontainer/rocky9/Dockerfile new file mode 100644 index 00000000..a6eafd33 --- /dev/null +++ b/.devcontainer/rocky9/Dockerfile @@ -0,0 +1,54 @@ +FROM rockylinux:9 + +# Install EPEL repository for additional packages +RUN dnf install -y epel-release && \ + dnf update -y + +# Enable CRB (CodeReady Builder) repository for development packages +RUN dnf install -y dnf-plugins-core && \ + dnf config-manager --set-enabled crb + +# Install build dependencies for LTFS +RUN dnf install -y \ + autoconf \ + automake \ + libtool \ + make \ + gcc \ + pkg-config \ + fuse-devel \ + fuse \ + libxml2-devel \ + libicu-devel \ + icu \ + libuuid-devel \ + net-snmp-devel \ + diffutils + +# Install development and debugging tools +RUN dnf install -y \ + gdb \ + valgrind \ + git \ + sudo + +# Install GitHub CLI +RUN dnf install -y 'dnf-command(config-manager)' && \ + dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ + dnf install -y gh + +# Clean up dnf cache +RUN dnf clean all + +# Create non-root user +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN groupadd --gid $USER_GID $USERNAME && \ + useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ + echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \ + chmod 0440 /etc/sudoers.d/$USERNAME + +USER $USERNAME +WORKDIR /workspaces diff --git a/.devcontainer/rocky9/devcontainer.json b/.devcontainer/rocky9/devcontainer.json new file mode 100644 index 00000000..2698896f --- /dev/null +++ b/.devcontainer/rocky9/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "LTFS Development (Rocky Linux 9)", + "build": { + "dockerfile": "Dockerfile", + "context": "../.." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools", + "ms-vscode.makefile-tools" + ] + } + }, + "postCreateCommand": "./autogen.sh && ./configure --prefix=/workspaces/ltfs-oss", + "remoteUser": "vscode" +} diff --git a/.devcontainer/ubuntu2404/Dockerfile b/.devcontainer/ubuntu2404/Dockerfile new file mode 100644 index 00000000..21f304f1 --- /dev/null +++ b/.devcontainer/ubuntu2404/Dockerfile @@ -0,0 +1,43 @@ +FROM ubuntu:24.04 + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Update and install build dependencies for LTFS +RUN apt-get update && apt-get install -y \ + autoconf \ + automake \ + libtool \ + make \ + gcc \ + pkg-config \ + libfuse-dev \ + fuse \ + libxml2-dev \ + libicu-dev \ + uuid-dev \ + libsnmp-dev \ + icu-devtools + +# Install development and debugging tools +RUN apt-get install -y \ + gdb \ + valgrind \ + git \ + sudo + +# Clean up apt cache +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +# Create non-root user +ARG USERNAME=vscode +ARG USER_UID=1001 +ARG USER_GID=$USER_UID + +RUN groupadd --gid $USER_GID $USERNAME && \ + useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ + echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \ + chmod 0440 /etc/sudoers.d/$USERNAME + +USER $USERNAME +WORKDIR /workspaces diff --git a/.devcontainer/ubuntu2404/devcontainer.json b/.devcontainer/ubuntu2404/devcontainer.json new file mode 100644 index 00000000..8900e3fb --- /dev/null +++ b/.devcontainer/ubuntu2404/devcontainer.json @@ -0,0 +1,21 @@ +{ + "name": "LTFS Development (Ubuntu 24.04)", + "build": { + "dockerfile": "Dockerfile", + "context": "../.." + }, + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools", + "ms-vscode.makefile-tools" + ] + } + }, + "postCreateCommand": "./autogen.sh && ./configure --prefix=/workspaces/ltfs-oss", + "remoteUser": "vscode" +} diff --git a/.gitignore b/.gitignore index 0711b11e..7c288718 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ ltfs.pc .libs/ messages/.lib .dirstamp +# local settings for claude code +.claude # Files created by OS .DS_Store # Files for development diff --git a/AGENTS.md b/AGENTS.md index 2ab5cd25..3c02ebee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ -# CLAUDE.md +# AGENTS.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to AI agents when working with code in this repository. ## Project Overview