forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneric-worker.Dockerfile
63 lines (44 loc) · 1.6 KB
/
generic-worker.Dockerfile
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Insecure generic worker
FROM golang:1.23.2-alpine AS build
ENV CGO_ENABLED=0
WORKDIR /app
# build depends on the .git
COPY . .
RUN apk add --no-cache bash git
WORKDIR /app/tools/livelog
RUN go build -o /livelog
WORKDIR /app/tools/worker-runner
RUN go build -o /start-worker ./cmd/start-worker
WORKDIR /app/tools/taskcluster-proxy
RUN go build -o /taskcluster-proxy
WORKDIR /app/clients/client-shell
RUN go build -o /taskcluster
WORKDIR /app/workers/generic-worker
RUN ./build.sh && \
mv generic-worker-multiuser-* /generic-worker && \
mv generic-worker-insecure-* /generic-worker-insecure
FROM ubuntu:jammy
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
gzip \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /livelog /taskcluster-proxy /start-worker /taskcluster /generic-worker* /usr/local/bin/
RUN ls -la /usr/local/bin
RUN mkdir -p /etc/generic-worker
RUN mkdir -p /var/local/generic-worker
# autogenerated ed25519 key is only good for local and testing
RUN generic-worker new-ed25519-keypair --file /etc/generic-worker/ed25519_key
# Write out the DockerFlow-compatible version.json file
ARG DOCKER_FLOW_VERSION
RUN if [ -n "${DOCKER_FLOW_VERSION}" ]; then \
echo "${DOCKER_FLOW_VERSION}" > /version.json; \
else \
echo \{\"version\": \"72.0.1\", \"commit\": \"local\", \"source\": \"https://github.com/taskcluster/taskcluster\", \"build\": \"NONE\"\} > /version.json; \
fi
VOLUME /etc/generic-worker
VOLUME /var/local/generic-worker
COPY workers/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
WORKDIR /var/local/generic-worker
ENTRYPOINT [ "/entrypoint.sh" ]