Skip to content

Commit 8b9f25f

Browse files
authored
Revert "将docker版本从22.04更新为24.04 (oceanbase#486)"
This reverts commit c9200f2.
1 parent 52cb602 commit 8b9f25f

File tree

2 files changed

+46
-52
lines changed

2 files changed

+46
-52
lines changed

deps/common/log/backtrace.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ See the Mulan PSL v2 for more details. */
1717
#include <execinfo.h>
1818
#include <inttypes.h>
1919
#include "common/lang/vector.h"
20-
#include <cstdlib>
2120

2221
namespace common {
2322

docker/Dockerfile

+46-51
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
1-
# how to use
2-
# use docker build: docker build -t miniob .
3-
# use docker compose: docker compose up -d --build
4-
# make sure docker has been installed
5-
FROM ubuntu:24.04
6-
7-
ENV LANG en_US.utf8
8-
9-
RUN apt-get update && apt-get install -y locales apt-utils && rm -rf /var/lib/apt/lists/* \
10-
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
11-
12-
# Change sources to Aliyun
13-
RUN cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak \
14-
&& echo 'Types: deb' > /etc/apt/sources.list.d/ubuntu.sources \
15-
&& echo 'URIs: http://mirrors.aliyun.com/ubuntu/' >> /etc/apt/sources.list.d/ubuntu.sources \
16-
&& echo 'Suites: noble noble-updates noble-security' >> /etc/apt/sources.list.d/ubuntu.sources \
17-
&& echo 'Components: main restricted universe multiverse' >> /etc/apt/sources.list.d/ubuntu.sources \
18-
&& echo 'Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg' >> /etc/apt/sources.list.d/ubuntu.sources \
19-
&& apt-get update
20-
21-
RUN apt-get update \
22-
&& apt-get install -y build-essential gdb cmake git wget flex texinfo libreadline-dev diffutils bison \
23-
&& apt-get install -y clang-format vim sudo
24-
25-
RUN apt-get install -y openssh-server
26-
27-
# Try cloning from GitHub, if it fails, use cnpmjs.org mirror
28-
RUN git clone https://github.com/oceanbase/miniob /tmp/miniob || \
29-
git clone https://githubfast.com/oceanbase/miniob /tmp/miniob \
30-
&& cd /tmp/miniob \
31-
&& THIRD_PARTY_INSTALL_PREFIX=/usr/local bash build.sh init \
32-
&& mkdir -p /root/docker/bin \
33-
&& touch /etc/.firstrun \
34-
&& cp docker/bin/* /root/docker/bin/ \
35-
&& rm -rf /tmp/miniob
36-
37-
RUN mkdir /var/run/sshd
38-
39-
RUN apt-get install -y zsh \
40-
&& mkdir ~/.oh-my-zsh \
41-
&& git clone https://gitee.com/mirrors/ohmyzsh.git ~/.oh-my-zsh \
42-
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
43-
&& sed -i "s/robbyrussell/bira/" ~/.zshrc \
44-
&& usermod --shell /bin/zsh root \
45-
&& echo "export LD_LIBRARY_PATH=/usr/local/lib64:\$LD_LIBRARY_PATH" >> ~/.zshrc
46-
47-
RUN chmod +x /root/docker/bin/*
48-
49-
WORKDIR /root
50-
51-
ENTRYPOINT /root/docker/bin/starter.sh
1+
# how to use
2+
# use docker build: docker build -t miniob .
3+
# use docker compose: docker compose up -d --build
4+
# make sure docker has been installed
5+
FROM ubuntu:22.04
6+
7+
# ENV LANG=en_US.UTF-8
8+
# locale
9+
RUN apt-get update && apt-get install -y locales apt-utils && rm -rf /var/lib/apt/lists/* \
10+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
11+
ENV LANG en_US.utf8
12+
13+
# dev tools
14+
RUN apt-get update \
15+
&& apt-get install -y build-essential gdb cmake git wget flex texinfo libreadline-dev diffutils bison \
16+
&& apt-get install -y clang-format vim
17+
18+
# install openssh
19+
RUN apt-get install -y openssh-server
20+
21+
# init miniob dependencies
22+
RUN git clone https://github.com/oceanbase/miniob /tmp/miniob \
23+
&& cd /tmp/miniob \
24+
&& THIRD_PARTY_INSTALL_PREFIX=/usr/local bash build.sh init \
25+
&& rm -rf /tmp/miniob
26+
27+
RUN mkdir /var/run/sshd
28+
29+
# install zsh and on-my-zsh
30+
RUN apt-get install -y zsh \
31+
&& git clone https://gitee.com/mirrors/ohmyzsh.git ~/.oh-my-zsh \
32+
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
33+
&& sed -i "s/robbyrussell/bira/" ~/.zshrc \
34+
&& usermod --shell /bin/zsh root \
35+
&& echo "export LD_LIBRARY_PATH=/usr/local/lib64:\$LD_LIBRARY_PATH" >> ~/.zshrc
36+
37+
RUN mkdir -p /root/docker/bin && touch /etc/.firstrun
38+
39+
# copy starter scripts
40+
COPY bin/* /root/docker/bin/
41+
42+
RUN chmod +x /root/docker/bin/*
43+
44+
WORKDIR /root
45+
46+
ENTRYPOINT /root/docker/bin/starter.sh

0 commit comments

Comments
 (0)