forked from OpenAtomFoundation/pikiwidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: optimize docker build (OpenAtomFoundation#2620)
- Loading branch information
Showing
4 changed files
with
30 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ubuntu:22.04 | ||
|
||
RUN sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/ports.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/security.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
build-essential \ | ||
git \ | ||
cmake \ | ||
autoconf \ | ||
clang-tidy-12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,22 @@ | ||
FROM ubuntu:22.04 AS builder | ||
FROM pikadb/pika_builder:ubuntu_22.04 as builder | ||
|
||
LABEL maintainer="[email protected], zhangshaomin_1990@126.com" | ||
LABEL maintainer="pikiwidb@gmail.com" | ||
|
||
ENV PIKA=/pika \ | ||
PIKA_BUILD_DIR=/tmp/pika \ | ||
PATH=${PIKA}:${PIKA}/bin:${PATH} \ | ||
BUILD_TYPE=RelWithDebInfo | ||
|
||
ARG ENABLE_PROXY=false | ||
|
||
RUN if [ "$ENABLE_PROXY" = "true" ] ; \ | ||
then sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/ports.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
fi | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
build-essential \ | ||
git \ | ||
cmake \ | ||
autoconf \ | ||
clang-tidy-12 | ||
|
||
WORKDIR ${PIKA_BUILD_DIR} | ||
|
||
COPY . ${PIKA_BUILD_DIR} | ||
|
||
RUN cmake -B ${PIKA_BUILD_DIR}/build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DUSE_PIKA_TOOLS=OFF | ||
RUN cmake --build ${PIKA_BUILD_DIR}/build --config ${BUILD_TYPE} | ||
|
||
FROM ubuntu:22.04 | ||
|
||
LABEL maintainer="[email protected], [email protected]" | ||
|
||
ARG ENABLE_PROXY=false | ||
|
||
RUN if [ "$ENABLE_PROXY" = "true" ] ; \ | ||
then sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/ports.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
fi | ||
FROM pikadb/pika_runner:ubuntu_22.04 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
rsync && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
LABEL maintainer="[email protected]" | ||
|
||
ENV PIKA=/pika \ | ||
PIKA_BUILD_DIR=/tmp/pika \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu:22.04 | ||
|
||
RUN sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/ports.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list ; \ | ||
sed -i 's/http:\/\/security.ubuntu.com/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
rsync && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists /var/cache/apt/archives |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters