Skip to content

Commit d914489

Browse files
committed
Add a small README
1 parent 5828996 commit d914489

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

template/docker/Dockerfile.j2

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,25 @@ echo -e "if [ -f ~/.bashrc ]; then\n\tsource ~/.bashrc\nfi" >> /stackable/.profi
143143
144144
chown ${STACKABLE_USER_UID}:0 /stackable/.bashrc
145145
chown ${STACKABLE_USER_UID}:0 /stackable/.profile
146+
147+
# All files and folders owned by root to support running as arbitrary users
148+
# This is best practice as all container users will belong to the root group (0)
149+
# This is not very relevant for the operator images but this makes it consistent with `docker-images`
150+
chown -R ${STACKABLE_USER_UID}:0 /stackable
151+
chmod -R g=u /stackable
152+
EOF
153+
154+
COPY <<EOF /README.md
155+
# Stackable Operator for {[ operator.pretty_string }]
156+
157+
* This image contains version ${VERSION} of the operator.
158+
* The operator binary can be found in `/usr/local/bin`
159+
* It is licensed under the OSL-3.0 - the full text can be found in `/licenses/LICENSE`
146160
EOF
147161
148162
COPY LICENSE /licenses/LICENSE
149163
150-
COPY --from=builder /app/* /usr/local/bin/
164+
COPY --from=builder --chown=${STACKABLE_USER_UID}:0 /app/* /usr/local/bin/
151165
152166
{[% if operator.include_productconfig is undefined or operator.include_productconfig == true %}]
153167
COPY deploy/config-spec/properties.yaml /etc/stackable/{[ operator.name }]/config-spec/properties.yaml

0 commit comments

Comments
 (0)