Skip to content

Commit a0305ee

Browse files
committed
add USER directive to the example image
1 parent f04723b commit a0305ee

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

apps/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
# Provision Spark applications from seaparate image
12

2-
# Generate report from the public data set
3+
## Build the image
4+
5+
docker build -t oci.stackable.tech/stackable/ny-tlc-report:0.3.0 -f apps/docker/Dockerfile .
6+
docker push oci.stackable.tech/stackable/ny-tlc-report:0.3.0
7+
8+
## Generate report from the public data set
39

410
spark-submit --conf spark.hadoop.fs.s3a.aws.credentials.provider=org.apache.hadoop.fs.s3a.AnonymousAWSCredentialsProvider --packages org.apache.hadoop:hadoop-aws:3.2.0,com.amazonaws:aws-java-sdk-s3:1.12.180,com.amazonaws:aws-java-sdk-core:1.12.180 ny_tlc_report.py --input 's3a://nyc-tlc/trip data/yellow_tripdata_2021-07.csv'
511

apps/docker/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ LABEL maintainer="Stackable GmbH"
55

66
WORKDIR /jobs
77

8+
# A user must be specified for the container to run on OpenShift
9+
# with the nonroot-v2 security context constraint and
10+
# without a runAsUser container annotation.
11+
USER 1000
12+
813
COPY apps/ny_tlc_report.py .

tests/test-definition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dimensions:
3333
- 3.9.3
3434
- name: ny-tlc-report
3535
values:
36-
- 0.2.0
36+
- 0.3.0
3737
- name: s3-use-tls
3838
values:
3939
- "false"

0 commit comments

Comments
 (0)