mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
add docker
This commit is contained in:
parent
868e39fcd9
commit
d4374e28f2
42
docker/Dockerfile
Normal file
42
docker/Dockerfile
Normal file
@ -0,0 +1,42 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install wget -y
|
||||
|
||||
RUN wget -O /etc/apt/sources.list http://mirrors.cloud.tencent.com/repo/ubuntu20_sources.list
|
||||
|
||||
RUN echo 'Asia/Shanghai' >/etc/timezone
|
||||
|
||||
# Update new packages
|
||||
RUN apt-get update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata
|
||||
RUN apt-get install -y \
|
||||
build-essential \
|
||||
make \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
vim \
|
||||
cmake \
|
||||
sudo \
|
||||
ninja-build \
|
||||
curl
|
||||
|
||||
RUN git clone --branch v1.6.1 https://gitee.com/mirrors/google-benchmark benchmark && \
|
||||
cd benchmark && \
|
||||
git clone https://gitee.com/mirrors/googletest && \
|
||||
cmake -E make_directory "build" && \
|
||||
cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../ && \
|
||||
cmake --build "build" --config Release && \
|
||||
sudo cmake --build "build" --config Release --target install
|
||||
|
||||
|
||||
# Get Rust
|
||||
ENV RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
|
||||
ENV RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
|
||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
|
||||
RUN apt-get install -y python3
|
13
docker/build.sh
Normal file
13
docker/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
DOCKER_NAME=pikadev
|
||||
|
||||
docker rm $DOCKER_NAME -f
|
||||
docker rmi $DOCKER_NAME
|
||||
|
||||
docker build -t $DOCKER_NAME .
|
||||
docker run -it --name $DOCKER_NAME \
|
||||
--restart=always \
|
||||
-v $PWD/..:/usr/src/pikascript \
|
||||
-w /usr/src/pikascript/port/linux \
|
||||
$DOCKER_NAME \
|
||||
bash
|
||||
# sh pull-core.sh && sh init.sh && sh gtest.sh && sh run.sh && bash
|
Loading…
x
Reference in New Issue
Block a user