Fixed the issue related to the timezones. Removed the tz setup inside the image. Now the host machine will set the tz. Also added a new variable USER_COMMAND_SETUP which will run after the SYS_COMMAND_INIT.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
40
.drone.yml
40
.drone.yml
@@ -8,12 +8,12 @@ steps:
|
||||
commands:
|
||||
- echo "$(date "+%Y-%m-%d"), latest" > .tags
|
||||
|
||||
- name: ubuntu-22
|
||||
- name: ubuntu-24
|
||||
image: &image thegeeklab/drone-docker-buildx:24
|
||||
depends_on: &depends
|
||||
- create_tags
|
||||
environment:
|
||||
UBUNTU_VER: 22.04
|
||||
UBUNTU_VER: 24.04
|
||||
settings: &settings
|
||||
registry:
|
||||
from_secret: package-repo
|
||||
@@ -21,17 +21,31 @@ steps:
|
||||
from_secret: gitea-username
|
||||
password:
|
||||
from_secret: gitea-password
|
||||
repo: ${DRONE_REPO_LINK:8}/ubuntu-22.04
|
||||
repo: ${DRONE_REPO_LINK:8}/ubuntu-24.04
|
||||
extra_tags:
|
||||
- ${DRONE_REPO_LINK:8}:22.04
|
||||
- ${DRONE_REPO_LINK:8}:24.04
|
||||
- ${DRONE_REPO_LINK:8}:latest
|
||||
build_args_from_env:
|
||||
UBUNTU_VER
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
provenance: false
|
||||
cache_from:
|
||||
- type=local\\,src=/cache/${DRONE_REPO}/ubuntu-24.04
|
||||
cache_to:
|
||||
- type=local,dest=/cache/${DRONE_REPO}/ubuntu-24.04,mode=max
|
||||
|
||||
- name: ubuntu-22
|
||||
image: *image
|
||||
depends_on: *depends
|
||||
environment:
|
||||
UBUNTU_VER: 22.04
|
||||
settings:
|
||||
<<: *settings
|
||||
repo: ${DRONE_REPO_LINK:8}/ubuntu-22.04
|
||||
extra_tags:
|
||||
- ${DRONE_REPO_LINK:8}:22.04
|
||||
cache_from:
|
||||
- type=local\\,src=/cache/${DRONE_REPO}/ubuntu-22.04
|
||||
cache_to:
|
||||
@@ -67,11 +81,11 @@ steps:
|
||||
cache_to:
|
||||
- type=local,dest=/cache/${DRONE_REPO}/ubuntu-18.04,mode=max
|
||||
|
||||
- name: send_n8n
|
||||
image: curlimages/curl:latest
|
||||
depends_on:
|
||||
- ubuntu-22
|
||||
- ubuntu-20
|
||||
- ubuntu-18
|
||||
commands:
|
||||
- curl https://n8n.ahkhan.me/webhook/drone/gitea/docker/ubuntu -H 'Authorization:Bearer wJlK5lDvTUS03Cfd4RWKyQ'
|
||||
# - name: send_n8n
|
||||
# image: curlimages/curl:latest
|
||||
# depends_on:
|
||||
# - ubuntu-22
|
||||
# - ubuntu-20
|
||||
# - ubuntu-18
|
||||
# commands:
|
||||
# - curl https://n8n.ahkhan.me/webhook/drone/gitea/docker/ubuntu -H 'Authorization:Bearer wJlK5lDvTUS03Cfd4RWKyQ'
|
||||
|
||||
@@ -4,7 +4,6 @@ FROM ubuntu:${UBUNTU_VER}
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
ENV TZ=Asia/Hong_Kong
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Enable autocompletion
|
||||
@@ -21,10 +20,6 @@ RUN apt install -y net-tools iputils-ping tcpdump traceroute iproute2 iptables i
|
||||
|
||||
RUN apt install -y software-properties-common
|
||||
|
||||
RUN apt install -y tzdata && \
|
||||
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||
dpkg-reconfigure --frontend noninteractive tzdata
|
||||
|
||||
# Installing locales
|
||||
RUN apt install -y locales
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
@@ -39,6 +34,6 @@ COPY scripts/entrypoint.sh /entrypoint.sh
|
||||
ENV LOG_FILE=/dev/null
|
||||
|
||||
# Reset DEBIAN_FRONTEND
|
||||
ENV DEBIAN_FRONTEND=dialog
|
||||
ENV DEBIAN_FRONTEND=""
|
||||
|
||||
CMD [ "/entrypoint.sh" ]
|
||||
|
||||
@@ -22,5 +22,6 @@ fi
|
||||
|
||||
eval $USER_COMMAND_INIT
|
||||
eval $SYS_COMMAND_INIT
|
||||
eval $USER_COMMAND_SETUP
|
||||
|
||||
tail -f $LOG_FILE & wait ${!}
|
||||
|
||||
Reference in New Issue
Block a user