Skip to content

Commit 4c0e6fa

Browse files
piste-jppiste2750
andauthored
feat: support dev container env (#564)
Co-authored-by: Atsushi Abe <piste.2750@gmail.com>
1 parent eb48b79 commit 4c0e6fa

File tree

6 files changed

+140
-2
lines changed

6 files changed

+140
-2
lines changed

.devcontainer/rocky9/Dockerfile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
FROM rockylinux:9
2+
3+
# Install EPEL repository for additional packages
4+
RUN dnf install -y epel-release && \
5+
dnf update -y
6+
7+
# Enable CRB (CodeReady Builder) repository for development packages
8+
RUN dnf install -y dnf-plugins-core && \
9+
dnf config-manager --set-enabled crb
10+
11+
# Install build dependencies for LTFS
12+
RUN dnf install -y \
13+
autoconf \
14+
automake \
15+
libtool \
16+
make \
17+
gcc \
18+
pkg-config \
19+
fuse-devel \
20+
fuse \
21+
libxml2-devel \
22+
libicu-devel \
23+
icu \
24+
libuuid-devel \
25+
net-snmp-devel \
26+
diffutils
27+
28+
# Install development and debugging tools
29+
RUN dnf install -y \
30+
gdb \
31+
valgrind \
32+
git \
33+
sudo
34+
35+
# Install GitHub CLI
36+
RUN dnf install -y 'dnf-command(config-manager)' && \
37+
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \
38+
dnf install -y gh
39+
40+
# Clean up dnf cache
41+
RUN dnf clean all
42+
43+
# Create non-root user
44+
ARG USERNAME=vscode
45+
ARG USER_UID=1000
46+
ARG USER_GID=$USER_UID
47+
48+
RUN groupadd --gid $USER_GID $USERNAME && \
49+
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
50+
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \
51+
chmod 0440 /etc/sudoers.d/$USERNAME
52+
53+
USER $USERNAME
54+
WORKDIR /workspaces
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "LTFS Development (Rocky Linux 9)",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "../.."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"ms-vscode.cpptools",
11+
"ms-vscode.cmake-tools",
12+
"ms-vscode.makefile-tools"
13+
]
14+
}
15+
},
16+
"postCreateCommand": "./autogen.sh && ./configure --prefix=/workspaces/ltfs-oss",
17+
"remoteUser": "vscode"
18+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM ubuntu:24.04
2+
3+
# Avoid prompts from apt
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
# Update and install build dependencies for LTFS
7+
RUN apt-get update && apt-get install -y \
8+
autoconf \
9+
automake \
10+
libtool \
11+
make \
12+
gcc \
13+
pkg-config \
14+
libfuse-dev \
15+
fuse \
16+
libxml2-dev \
17+
libicu-dev \
18+
uuid-dev \
19+
libsnmp-dev \
20+
icu-devtools
21+
22+
# Install development and debugging tools
23+
RUN apt-get install -y \
24+
gdb \
25+
valgrind \
26+
git \
27+
sudo
28+
29+
# Clean up apt cache
30+
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
31+
32+
# Create non-root user
33+
ARG USERNAME=vscode
34+
ARG USER_UID=1001
35+
ARG USER_GID=$USER_UID
36+
37+
RUN groupadd --gid $USER_GID $USERNAME && \
38+
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
39+
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \
40+
chmod 0440 /etc/sudoers.d/$USERNAME
41+
42+
USER $USERNAME
43+
WORKDIR /workspaces
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "LTFS Development (Ubuntu 24.04)",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "../.."
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/github-cli:1": {}
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"ms-vscode.cpptools",
14+
"ms-vscode.cmake-tools",
15+
"ms-vscode.makefile-tools"
16+
]
17+
}
18+
},
19+
"postCreateCommand": "./autogen.sh && ./configure --prefix=/workspaces/ltfs-oss",
20+
"remoteUser": "vscode"
21+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ltfs.pc
2323
.libs/
2424
messages/.lib
2525
.dirstamp
26+
# local settings for claude code
27+
.claude
2628
# Files created by OS
2729
.DS_Store
2830
# Files for development

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# CLAUDE.md
1+
# AGENTS.md
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+
This file provides guidance to AI agents when working with code in this repository.
44

55
## Project Overview
66

0 commit comments

Comments
 (0)