Skip to content

Commit 7fa63b7

Browse files
authored
ci: move and simplify Dockerfile and build script to stay in repository (#44)
1 parent 4a9042a commit 7fa63b7

File tree

6 files changed

+21
-41
lines changed

6 files changed

+21
-41
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update \
1010
ARG VERSION=latest
1111
RUN echo $VERSION > /VERSION
1212

13-
COPY tmp /cvm-agent
13+
COPY . /cvm-agent
1414

1515
RUN wget --no-proxy --progress=bar:force -c https://dl.google.com/go/go1.24.9.linux-amd64.tar.gz -O - | tar -xz -C /usr/local
1616
ENV PATH=$PATH:/usr/local/go/bin
@@ -127,16 +127,14 @@ COPY --from=build /usr/local/lib/rats-tls/ /usr/local/lib/rats-tls/
127127
RUN mkdir -p /workplace/cvm-agent/cvmassistants/secretprovider
128128
COPY --from=build /cvm-agent/cvmassistants/secretprovider/secret-provider-agent/secret_provider_agent /workplace/cvm-agent/cvmassistants/secretprovider
129129

130-
#RUN echo "export LD_LIBRARY_PATH=/usr/local/lib/rats-tls:$LD_LIBRARY_PATH" >> /etc/profile
131-
132130
#config supervisord
133131
RUN apt-get update \
134132
&& env DEBIAN_FRONTEND=noninteractive apt-get install -y \
135133
supervisor \
136134
curl
137135

138136
#todo make supervisord.conf configurable so that it can change the log path
139-
COPY --from=build /cvm-agent/base-image/supervisord/supervisord.conf /etc/supervisor/
137+
COPY --from=build /cvm-agent/supervisord/supervisord.conf /etc/supervisor/
140138
COPY --from=build /cvm-agent/apploader/conf/appload-supervisord.ini /workplace/supervisord/apploader
141139

142140
#install firewall

base-image/release.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ Running:
5555
To build the confidential VM base image:
5656

5757
```bash
58-
cd base-image
59-
bash release.sh buildimage
58+
bash release.sh
6059
```
6160

6261
This will compile all necessary components (e.g., the secret provider agent) and produce a Docker image named ```cvm-base```

release.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -o errexit
3+
set -x
4+
BASE_NAME=cvm-base
5+
BASE_DIR="$( cd "$( dirname "$0" )" && pwd )"
6+
VERSION=$(git tag -l --points-at HEAD|awk -F'v' '{print $2}')
7+
8+
if [ -z "$VERSION" ] ; then
9+
VERSION=latest
10+
fi
11+
12+
git_commit="$(git rev-parse --short=8 HEAD)"
13+
build_time=$(date +%F-%H-%M-%S)
14+
release_desc="${VERSION}-${git_commit}-${build_time}"
15+
16+
PROXY=$1
17+
echo "---> Build Image"
18+
docker build --no-cache --build-arg VERSION=$release_desc --build-arg https_proxy=${PROXY} -t $BASE_NAME:${VERSION} .
File renamed without changes.

0 commit comments

Comments
 (0)