Skip to content

Commit db695f9

Browse files
committed
feat: add devcontainer
1 parent 3b59ef2 commit db695f9

File tree

4 files changed

+106
-2
lines changed

4 files changed

+106
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
{
21+
"name": "Iceberg CPP Dev Container",
22+
"build": {
23+
"dockerfile": "../Dockerfile"
24+
},
25+
"runArgs": [
26+
"--ulimit=core=-1",
27+
"--cap-add=SYS_ADMIN",
28+
"--cap-add=SYS_PTRACE",
29+
"--cap-add=PERFMON",
30+
"--security-opt",
31+
"seccomp=unconfined",
32+
"--privileged"
33+
],
34+
"mounts": [
35+
"source=${localEnv:HOME}/.ssh,target=/home/iceberg/.ssh,type=bind,readonly"
36+
],
37+
"customizations": {
38+
"vscode": {
39+
"extensions": [
40+
"eamodio.gitlens"
41+
],
42+
"settings": {
43+
"editor.formatOnSave": true
44+
}
45+
}
46+
}
47+
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ cmake-build-debug/
2020
cmake-build-release/
2121
.DS_Store
2222

23-
2423
# intellij files
2524
.idea
2625

2726
# vscode files
2827
.vscode
28+
.cache
2929

3030
# meson subprojects - wrap files need to be kept to let meson download
3131
# dependencies as needed, but dependencies themselves should not be versioned

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
rev: v20.1.8
3434
hooks:
3535
- id: clang-format
36-
exclude: ^src/iceberg/test/resources/.*\.json$
36+
exclude_types: [json]
3737

3838
- repo: https://github.com/cheshirekow/cmake-format-precommit
3939
rev: v0.6.10

Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# This Dockerfile is used to build a development container for Iceberg C++.
19+
# It is based on the Ubuntu image and installs necessary dependencies.
20+
21+
FROM ubuntu:24.04
22+
23+
# Install necessary packages
24+
RUN apt-get update && \
25+
apt-get install -y \
26+
bash-completion \
27+
build-essential \
28+
ccache \
29+
cmake \
30+
curl \
31+
gcc \
32+
g++ \
33+
git \
34+
htop \
35+
libboost-all-dev \
36+
libcurl4-openssl-dev \
37+
libssl-dev \
38+
libxml2-dev \
39+
meson \
40+
ninja-build \
41+
pkg-config \
42+
python3 \
43+
python3-pip \
44+
vim \
45+
wget \
46+
sudo \
47+
&& rm -rf /var/lib/apt/lists/*
48+
49+
# Add a user for development
50+
RUN useradd -ms /bin/bash iceberg && \
51+
usermod -aG sudo iceberg && \
52+
echo "iceberg ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/iceberg && \
53+
chmod 0440 /etc/sudoers.d/iceberg
54+
55+
# Switch to the iceberg user
56+
USER iceberg
57+
WORKDIR /home/iceberg

0 commit comments

Comments
 (0)