Skip to content

Commit e35fdb2

Browse files
committed
Dockerfile: upgrade to ACS 4.22
1 parent 33033ef commit e35fdb2

File tree

3 files changed

+71
-3
lines changed

3 files changed

+71
-3
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Docker Image Build
19+
20+
on:
21+
push:
22+
branches:
23+
- main
24+
tags:
25+
- '*'
26+
pull_request:
27+
28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
build:
37+
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
38+
runs-on: ubuntu-24.04
39+
steps:
40+
- name: Login to Docker Registry
41+
uses: docker/login-action@v3
42+
with:
43+
registry: ${{ secrets.DOCKER_REGISTRY }}
44+
username: ${{ secrets.DOCKERHUB_USER }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+
- name: Set Docker repository name
48+
run: echo "DOCKER_REPOSITORY=weizhouapache" >> $GITHUB_ENV
49+
50+
- uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 0
53+
54+
- name: Set Docker image TAG
55+
run: echo "TAG=$(if [ "${{ github.event_name }}" = "pull_request" ];then echo "pr${{ github.event.pull_request.number}}"; elif [ "${{ github.ref_name }}" = "main" ];then echo "latest"; else echo ${{ github.ref_name }};fi)" >> $GITHUB_ENV
56+
57+
- name: Set Docker image FULL TAG
58+
run: echo "FULL_TAG=$(if [ "${{ secrets.DOCKER_REGISTRY }}" = "" ];then echo ${DOCKER_REPOSITORY}/cloudstack-management:${TAG};else echo ${{ secrets.DOCKER_REGISTRY }}/${DOCKER_REPOSITORY}/cloudstack-management:${TAG};fi)" >> $GITHUB_ENV
59+
60+
- name: Build the Docker image for cloudstack-management
61+
run: docker build . --file Dockerfile --tag ${FULL_TAG}
62+
- name: Push Docker image to Docker Registry
63+
run: docker push ${FULL_TAG}
64+
65+
- name: Tag Docker image with CloudStack version
66+
run: if [ "${TAG}" = "latest" ];then docker tag ${FULL_TAG} ${FULL_TAG/:latest/:4.22.0.0}; fi
67+
- name: Push Docker image with CloudStack version to Docker Registry
68+
run: if [ "${TAG}" = "latest" ];then docker push ${FULL_TAG/:latest/:4.22.0.0}; fi

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt update -qq && \
77
apt upgrade -y && \
88
apt install -y curl iproute2 net-tools iputils-ping apt-transport-https openssh-server
99

10-
RUN echo "deb http://download.cloudstack.org/ubuntu noble 4.21" > /etc/apt/sources.list.d/cloudstack.list && \
10+
RUN echo "deb http://download.cloudstack.org/ubuntu noble 4.22" > /etc/apt/sources.list.d/cloudstack.list && \
1111
curl -L http://download.cloudstack.org/release.asc -o /etc/apt/trusted.gpg.d/cloudstack.asc && \
1212
apt update -qq && \
1313
apt install -y cloudstack-management && \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ To fix it, make the following change in the containers and restart them.
6565

6666
To manage cloudstack management service:
6767

68-
/usr/bin/cloudstack-management status/start/stop/restart
68+
systemctl status/start/stop/restart cloudstack-management
6969

7070
To manage cloudstack usage service:
7171

72-
/usr/bin/cloudstack-usage status/start/stop/restart
72+
systemctl status/start/stop/restart cloudstack-usage
7373

0 commit comments

Comments
 (0)