Skip to content

Commit 3af68a5

Browse files
committed
feat: Update Docker image to Debian and remove entrypoint
1 parent 527298e commit 3af68a5

File tree

4 files changed

+20
-46
lines changed

4 files changed

+20
-46
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Dockerfile
22
.env
33
target/
44
examples/
5-
5+
.codeql/

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.env
2+
run.sh
23
target/
34
extractors/
45
db-*/
56
.codeql/
6-

Dockerfile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
FROM docker.io/library/rust:1.85-alpine as builder
1+
FROM docker.io/library/rust:1.85-slim as builder
22

3-
ENV TARGET=x86_64-unknown-linux-musl
3+
ENV TARGET=x86_64-unknown-linux-gnu
44

55
WORKDIR /app
66

77
COPY . .
88

99
# Install dependencies
10-
RUN apk update && \
11-
apk add --no-cache pkgconf alpine-sdk openssl-dev perl musl-dev && \
12-
rustup target add ${TARGET} && \
13-
cargo build --release --target ${TARGET} && \
14-
mv target/${TARGET}/release/codeql-extractor-action target/
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends pkg-config build-essential libssl-dev && \
12+
cargo build --release && \
13+
mv target/release/codeql-extractor-action target/
1514

16-
FROM docker.io/library/alpine:3.21
15+
FROM docker.io/library/debian:12-slim
1716
WORKDIR /app
1817

19-
RUN apk update && \
20-
apk add --no-cache github-cli && \
21-
rm -rf /var/cache/apk/*
22-
2318
COPY --from=builder /app/target/codeql-extractor-action /usr/local/bin/codeql-extractor-action
2419

20+
# Install gh CLI
21+
RUN apt-get update && \
22+
apt-get install -y --no-install-recommends curl git ca-certificates && \
23+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
24+
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
25+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
26+
apt-get update && \
27+
apt-get install -y --no-install-recommends gh && \
28+
apt-get clean && \
29+
rm -rf /var/lib/apt/lists/*
30+
2531
ENTRYPOINT [ "codeql-extractor-action" ]

entrypoint.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)