-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ci
More file actions
41 lines (36 loc) · 1.34 KB
/
Dockerfile.ci
File metadata and controls
41 lines (36 loc) · 1.34 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
# Docker file for github actions CI build
FROM stablecog/ubuntu:22.04
# Install mise for railpack
ARG MISE_VERSION=2025.6.1
ARG MISE_DIR=/tmp/railpack/mise
ARG MISE_BIN=${MISE_DIR}/mise-${MISE_VERSION}
RUN apt-get update && \
apt-get install -y --no-install-recommends curl ca-certificates && \
mkdir -p "${MISE_DIR}" && \
\
# Detect host architecture and map to the correct asset name
ARCH="$(uname -m)"; \
case "${ARCH}" in \
x86_64) MISE_ASSET="linux-x64" ;; \
aarch64|arm64) MISE_ASSET="linux-arm64" ;; \
armv7l) MISE_ASSET="linux-armv7" ;; \
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
esac && \
\
# Download the statically-linked binary that matches the platform
curl -L -o "${MISE_BIN}" \
"https://github.com/jdx/mise/releases/download/v${MISE_VERSION}/mise-v${MISE_VERSION}-${MISE_ASSET}" && \
chmod +x "${MISE_BIN}" && \
ln -sf "${MISE_BIN}" /usr/local/bin/mise && \
\
# Clean up build deps to minimise final image size
apt-get purge -y --auto-remove curl && \
rm -rf /var/lib/apt/lists/*
COPY ./internal/oauth2server/template/* /app/template/
COPY ./ent/migrate/migrations/* /app/migrations/
COPY ./cmd/api/api /app/api
COPY ./cmd/oauth2server/oauth2server /app/oauth2server
COPY ./cmd/cli/cli /app/cli
EXPOSE 8089
EXPOSE 8090
CMD ["/app/server"]