Skip to content

Commit

Permalink
fix container environments
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Jun 19, 2024
1 parent 2796c9f commit a590d45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 1 addition & 7 deletions oblogproxy-ce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ FROM openanolis/anolisos:8.8

ARG VERSION

ENV OB_SYS_USERNAME=${OB_SYS_USERNAME}
ENV OB_SYS_PASSWORD=${OB_SYS_PASSWORD}

RUN yum install -y yum-utils diffutils && \
yum-config-manager --add-repo https://mirrors.oceanbase.com/oceanbase/OceanBase.repo && \
sed -i 's/$releasever/8/' /etc/yum.repos.d/OceanBase.repo && \
Expand All @@ -14,10 +11,7 @@ RUN yum install -y yum-utils diffutils && \
release=`yum info oblogproxy | grep Release | awk '{print $3}' | awk -F. '{print $1}'`; \
VERSION="${version}-${release}"; \
fi && \
yum install -y oblogproxy-${VERSION}.el8 && yum clean all && \
if [[ -n ${OB_SYS_USERNAME} && -n ${OB_SYS_PASSWORD} ]]; then \
echo "y" | /usr/local/oblogproxy/run.sh config_sys ${OB_SYS_USERNAME} ${OB_ROOT_PASSWORD}; \
fi
yum install -y oblogproxy-${VERSION}.el8 && yum clean all

COPY start.sh /root/boot/
WORKDIR /root/boot/
Expand Down
4 changes: 4 additions & 0 deletions oblogproxy-ce/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

if [[ -n ${OB_SYS_USERNAME} && -n ${OB_SYS_PASSWORD} ]]; then
echo "y" | /usr/local/oblogproxy/run.sh config_sys ${OB_SYS_USERNAME} ${OB_ROOT_PASSWORD}
fi

rm -rf /usr/local/oblogproxy/run/*
/usr/local/oblogproxy/run.sh start
exec /sbin/init

0 comments on commit a590d45

Please sign in to comment.