Skip to content

Commit cb8a023

Browse files
authored
Merge pull request #7 from vibhatha/feat-dockerfile
feat(docker): Adding Dockerfile
2 parents c8eb62b + dfc1dd9 commit cb8a023

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

docker/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
FROM ubuntu:20.04
3+
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5+
6+
WORKDIR /substrait
7+
8+
RUN DEBIAN_FRONTEND=noninteractive TZ=America/New_York apt-get update -y && apt-get upgrade -y \
9+
&& apt-get install -y sudo apt-utils tzdata
10+
RUN dpkg-reconfigure tzdata
11+
12+
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y git build-essential cmake
13+
14+
RUN git clone https://github.com/substrait-io/substrait-cpp.git \
15+
&& cd substrait-cpp \
16+
&& git submodule sync --recursive \
17+
&& git submodule update --init --recursive
18+
19+
RUN cd substrait-cpp && ./scripts/setup-ubuntu.sh
20+
21+
RUN cd substrait-cpp && make
22+
23+
ENTRYPOINT ["/bin/bash"]

docker/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Setup Docker Container
2+
3+
## Build
4+
5+
```bash
6+
docker build -t substrait-cpp .
7+
```
8+
9+
## Run
10+
11+
```bash
12+
docker run -it substrait-cpp
13+
```
14+
15+
## Evaluate
16+
17+
Run function tests
18+
19+
```bash
20+
./build-Debug/substrait/function/tests/substrait_function_test
21+
```

scripts/setup-ubuntu.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
1313

1414
# Install all dependencies.
1515
sudo --preserve-env apt install -y \
16+
wget \
1617
g++ \
1718
cmake \
1819
ccache \

third_party/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3+
add_subdirectory(fmt)
34
add_subdirectory(googletest)
45

56
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing")

0 commit comments

Comments
 (0)