add dockerfile

This commit is contained in:
lyon1998 2022-04-21 14:29:23 +08:00
parent d4374e28f2
commit 5824c0ed8b
4 changed files with 22 additions and 12 deletions

View File

@ -1,9 +1,6 @@
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
ADD ubuntu20_sources.list /etc/apt/sources.list
RUN echo 'Asia/Shanghai' >/etc/timezone
@ -40,3 +37,5 @@ ENV PATH="/root/.cargo/bin:${PATH}"
RUN apt-get install -y python3
RUN git config --global --add safe.directory /usr/src/pikascript

View File

@ -1,13 +1,5 @@
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

9
docker/run.sh Normal file
View File

@ -0,0 +1,9 @@
DOCKER_NAME=pikadev
docker rm $DOCKER_NAME -f
docker run -it --name $DOCKER_NAME \
--restart=always \
-v $PWD/..:/usr/src/pikascript \
-w /usr/src/pikascript/port/linux \
$DOCKER_NAME \
bash

View File

@ -0,0 +1,10 @@
deb http://mirrors.cloud.tencent.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ focal-updates main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-updates main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-backports main restricted universe multiverse