-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix -startup script * chmod fix * use normal ubi image --------- Co-authored-by: A <andrei.noga@sva.de>
- Loading branch information
1 parent
c0999fd
commit 2dd57fe
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi-init@sha256:d35aff7118921a3a2c2e78507fc7329b499b8fb09d290dc60a44eea6cdeb9b5c | ||
FROM registry.access.redhat.com/ubi8/ubi | ||
|
||
# Add repositories | ||
COPY zscaler.repo /etc/yum.repos.d/ | ||
|
||
# Add startup script | ||
COPY start.sh /start.sh | ||
|
||
# Install packages and enable services | ||
RUN yum -y install zpa-connector rsyslog && \ | ||
RUN yum -y install zpa-connector && \ | ||
yum clean all && \ | ||
systemctl enable zpa-connector rsyslog | ||
chmod +x /start.sh | ||
|
||
CMD [ "/sbin/init" ] | ||
CMD [ "/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
chown -R zscaler /opt/zscaler | ||
if [ ! -f "/opt/zscaler/var/provision_key" ]; then | ||
echo "Adding provisioning key from environment" | ||
echo ${ZPA_PROVISION_KEY} > /opt/zscaler/var/provision_key | ||
fi | ||
|
||
cd /opt/zscaler/var | ||
|
||
ulimit -n 512000 | ||
arch=$(uname -m) | ||
|
||
if [ "$arch" == 'aarch64' ] || [ ! -z "$LIMITED_MEM" ]; | ||
then | ||
exec /opt/zscaler/bin/zpa-connector -memory_arena_count 1 -container "$@" | ||
else | ||
exec /opt/zscaler/bin/zpa-connector -container "$@" | ||
fi |