Skip to content

Commit 6f4633b

Browse files
committed
use docker build args
1 parent 7ac36ec commit 6f4633b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

dataflows/car-processing/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ COPY run.sh .
66
ENV PATH "$PATH:/root/.fluvio/bin"
77
ENV PATH "$PATH:/root/.fvm/bin"
88

9+
ARG FLUVIO_VERSION=
10+
911
RUN apt-get update && \
1012
apt-get install -y \
1113
curl unzip cargo
@@ -20,10 +22,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
2022
rustup default 1.80.0
2123
RUN rustup target add wasm32-wasip2
2224

23-
RUN curl -fsS https://hub.infinyon.cloud/install/install.sh?ctx=dc | bash && \
24-
echo 'source "${HOME}/.fvm/env"' >> ~/.bashrc && \
25-
fvm install sdf-beta11
26-
25+
RUN curl -fsS "https://hub.infinyon.cloud/install/install.sh?ctx=sdf-demo" | FLUVIO_VERSION=${FLUVIO_VERSION} bash &&
26+
echo 'source "${HOME}/.fvm/env"' >> ~/.bashrc
2727
RUN cd /workspace/connectors/ && \
2828
cdk hub download infinyon/[email protected]
2929

dataflows/car-processing/README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ sdf clean --force
383383
## Dockerfile
384384
To run the above with a container, a Dockerfile is included. The docker container will install all the required files and packages. The included shell script starts a fluvio cluster as well as the connectors required for the car dataflow to work. You can alter the consume command in the [run.sh](run.sh) to view different topics. The dataflow does take a long time to run.
385385
```
386-
docker build -t carproc .
386+
docker build --build-arg FLUVIO_VERSION=sdf-beta12 -t carproc .
387387
docker run carproc
388388
```
389389
### Expected Output

docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM rust:1-slim-bookworm
22

3+
ARG FLUVIO_VERSION=
4+
35
RUN rustup target add wasm32-wasip2
46
RUN apt-get update
57
RUN apt-get install -y curl unzip
68
RUN apt-get install -y tini openssl curl
7-
RUN curl -fsS "https://hub.infinyon.cloud/install/install.sh?ctx=sdf-demo" | FLUVIO_VERSION=sdf-beta11 bash
9+
RUN curl -fsS "https://hub.infinyon.cloud/install/install.sh?ctx=sdf-demo" | FLUVIO_VERSION=${FLUVIO_VERSION} bash
810

911
ENV PATH "$PATH:/root/.fluvio/bin"
1012
ENV PATH "$PATH:/root/.fvm/bin"

docker/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build Environment
2-
docker build -t fluvio:sdf .
2+
docker build --build-arg FLUVIO_VERSION=sdf-beta12 -t fluvio:sdf .
33

44
# Run SDF in Docker
55
docker compose up -d

0 commit comments

Comments
 (0)