-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile.dev
More file actions
27 lines (20 loc) · 841 Bytes
/
Dockerfile.dev
File metadata and controls
27 lines (20 loc) · 841 Bytes
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
FROM ubuntu:22.04
ARG USERNAME=semaphore
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create the user
RUN groupadd --gid $USER_GID $USERNAME && \
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
RUN apt-get update -y && apt-get install -y ca-certificates curl
RUN update-ca-certificates
# kubectl is required to be present in the container running the agent
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
# Install Semaphore agent
RUN mkdir -p /opt/semaphore
ADD build/agent /opt/semaphore/agent
RUN chown ${USER_UID}:${USER_GID} /opt/semaphore
USER $USERNAME
WORKDIR /home/semaphore
HEALTHCHECK NONE
CMD ["/opt/semaphore/agent", "start", "--config-file", "/opt/semaphore/semaphore-agent.yml"]