openGauss-server/docker/dockerfiles/1.0.0/dockerfile_arm

49 lines
2.0 KiB
Plaintext
Executable File

FROM openeuler-20.03-lts:latest
COPY openGauss-1.0.0-openEuler-64bit.tar.bz2 .
COPY gosu-arm64 /usr/local/bin/gosu
COPY openEuler_aarch64.repo /etc/yum.repos.d/openEuler_aarch64.repo
ENV LANG en_US.utf8
#RUN yum install -y epel-release
RUN set -eux; \
yum install -y bzip2 curl libaio shadow tar&& \
groupadd -g 70 omm; \
useradd -u 70 -g omm -d /home/omm omm; \
mkdir -p /var/lib/opengauss && \
mkdir -p /usr/local/opengauss && \
mkdir -p /var/run/opengauss && \
mkdir /docker-entrypoint-initdb.d && \
tar -jxvf openGauss-1.0.0-openEuler-64bit.tar.bz2 -C /usr/local/opengauss && \
chown -R omm:omm /var/run/opengauss && chown -R omm:omm /usr/local/opengauss && chown -R omm:omm /var/lib/opengauss && chown -R omm:omm /docker-entrypoint-initdb.d && \
chmod 2777 /var/run/opengauss && \
rm -rf openGauss-1.0.0-openEuler-64bit.tar.bz2 && yum clean all
RUN set -eux; \
echo "export GAUSSHOME=/usr/local/opengauss" >> /home/omm/.bashrc && \
echo "export PATH=\$GAUSSHOME/bin:\$PATH " >> /home/omm/.bashrc && \
echo "export LD_LIBRARY_PATH=\$GAUSSHOME/lib:\$LD_LIBRARY_PATH" >> /home/omm/.bashrc
ENV GOSU_VERSION 1.12
RUN set -eux; \
# dpkgArch=`case $(uname -m) in i386) echo "386" ;; i686) echo "386" ;; x86_64) echo "amd64";; aarch64)echo "arm64";; esac`; \
# gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
# && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
# && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
# && gpg --verify /usr/local/bin/gosu.asc \
# && rm /usr/local/bin/gosu.asc \
# && rm -r /root/.gnupg/ \
chmod +x /usr/local/bin/gosu
ENV PGDATA /var/lib/opengauss/data
COPY entrypoint.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/entrypoint.sh;ln -s /usr/local/bin/entrypoint.sh / # backwards compat
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 5432
CMD ["gaussdb"]