-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (35 loc) · 1.61 KB
/
Dockerfile
File metadata and controls
49 lines (35 loc) · 1.61 KB
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
FROM alpine:latest AS build
# Set environment variable for Manager.io version
ARG MANAGER_VERSION
ARG TARGETPLATFORM
RUN apk --no-cache add curl
# Download and extract ManagerServer binary
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then TARGET=arm64; else TARGET=x64 ; fi; \
echo "https://github.com/Manager-io/Manager/releases/download/${MANAGER_VERSION}/ManagerServer-linux-${TARGET}.tar.gz"; \
curl -L "https://github.com/Manager-io/Manager/releases/download/${MANAGER_VERSION}/ManagerServer-linux-${TARGET}.tar.gz" --output /tmp/manager-server.tar.gz; \
mkdir /tmp/manager-server/; \
tar -xvzf /tmp/manager-server.tar.gz -C /tmp/manager-server/
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0
# Set environment variable for Manager.io version
ARG MANAGER_VERSION
LABEL build_version="version:- ${MANAGER_VERSION}"
# Use wrapper for Puppeteer
ENV PUPPETEER_EXECUTABLE_PATH=/usr/local/bin/chromium-wrapper
RUN apt update; \
apt install -y curl chromium; \
apt clean; \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/manager-server
# Copy the extracted binary
COPY --from=build /tmp/manager-server/ .
# Copy local chromium wrapper into the image
COPY chromium-wrapper /usr/local/bin/chromium-wrapper
# Set permissions for ManagerServer executable
RUN chmod +x /opt/manager-server/ManagerServer /usr/local/bin/chromium-wrapper
# Define HEALTHCHECK for liveness probe
HEALTHCHECK --interval=10s --timeout=5s --retries=3 \
CMD curl --fail -s http://localhost:8080/healthz || exit 1
# Run instance of Manager
CMD ["/opt/manager-server/ManagerServer","-port","8080","-path","/data"]
VOLUME /data
EXPOSE 8080