update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
MAINTAINER Colben colbenlee@gmail.com
|
||||
ADD --chown=root:root /ADD/localtime /etc/localtime
|
||||
ENV LANG=en_US.UTF-8
|
||||
@@ -16,7 +16,7 @@ alias grep='grep --color=auto'\n\
|
||||
&& ln -sf /bin/bash /bin/sh \
|
||||
&& apt update -y \
|
||||
&& apt install -y ca-certificates \
|
||||
&& sed -i '/^deb /s,http://ports.ubuntu.com,https://mirrors.tuna.tsinghua.edu.cn,' /etc/apt/sources.list \
|
||||
&& sed -i '/^deb /s,http://archive.ubuntu.com,https://mirrors.tuna.tsinghua.edu.cn,' /etc/apt/sources.list \
|
||||
&& apt update -y \
|
||||
&& apt install -y vim-tiny less curl iproute2 \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/* /var/cache/apt/archives /root/.bashrc /root/.profile
|
||||
@@ -9,7 +9,8 @@ export LANG=en_US.UTF-8
|
||||
|
||||
[ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)"
|
||||
ROOT_DIR="$(cd $(dirname $0) && pwd)"
|
||||
IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:20"
|
||||
TAG=$1
|
||||
IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:$TAG"
|
||||
|
||||
if [ -t 0 ]; then
|
||||
function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; }
|
||||
@@ -53,7 +54,7 @@ function Build {
|
||||
&& Warn Removing image $IMAGE ... \
|
||||
&& docker rmi $IMAGE
|
||||
Warn Building image: $IMAGE ...
|
||||
docker build --force-rm -t $IMAGE .
|
||||
docker build --force-rm -t $IMAGE -f Dockerfile-$TAG .
|
||||
YesOrNo Push image: $IMAGE? && docker push $IMAGE
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user