-
Notifications
You must be signed in to change notification settings - Fork 8
/
buildconfig.yaml
46 lines (45 loc) · 1.43 KB
/
buildconfig.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: azure-build-agent
spec:
output:
to:
kind: ImageStreamTag
name: azure-build-agent:latest
source:
dockerfile: |
FROM registry.access.redhat.com/ubi8/dotnet-60-runtime:latest
ENV _BUILDAH_STARTED_IN_USERNS="" \
BUILDAH_ISOLATION=chroot \
STORAGE_DRIVER=vfs
USER root
COPY start.sh .
RUN dnf install git jq podman-docker -y && \
curl $AZP_AGENT_PACKAGE_LATEST_URL --output vsts-agent-linux-x64.tar.gz && \
tar zxvf vsts-agent-linux-x64.tar.gz && \
rm vsts-agent-linux-x64.tar.gz && \
chmod 755 *.sh && chown -R default:root . && \
touch /etc/containers/nodocker && \
usermod --add-subuids 100000-165535 default && \
usermod --add-subgids 100000-165535 default && \
setcap cap_setuid+eip /usr/bin/newuidmap && \
setcap cap_setgid+eip /usr/bin/newgidmap
USER 1001
ENTRYPOINT ["./start.sh"]
configMaps:
- configMap:
name: start-sh
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: dotnet-runtime:6.0
namespace: openshift
env:
- name: AZP_AGENT_PACKAGE_LATEST_URL
value: >-
https://vstsagentpackage.azureedge.net/agent/2.210.1/vsts-agent-linux-x64-2.210.1.tar.gz
triggers:
- type: ConfigChange
- type: ImageChange