-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.alpine
More file actions
49 lines (36 loc) · 1.18 KB
/
Copy pathContainerfile.alpine
File metadata and controls
49 lines (36 loc) · 1.18 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
# SPDX-License-Identifier: MPL-2.0
# Alpine-based fallback container for bitfuckit
# For systems without Wolfi/Chainguard access
# Build: nerdctl build -f Containerfile.alpine -t bitfuckit:alpine .
# Stage 1: Build
FROM alpine:edge AS builder
# Enable testing repo for Ada packages
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache \
gcc-gnat@testing \
gprbuild@testing \
curl-dev \
git \
make
WORKDIR /build
COPY . .
RUN gprbuild -P bitfuckit.gpr -j0
# Stage 2: Runtime
FROM alpine:edge
RUN apk add --no-cache \
libcurl \
libgcc \
git \
ca-certificates
# Create user
RUN addgroup -S bitfuckit && adduser -S bitfuckit -G bitfuckit
COPY --from=builder /build/bin/bitfuckit /usr/local/bin/
COPY --from=builder /build/completions /usr/share/bitfuckit/completions/
USER bitfuckit
WORKDIR /home/bitfuckit
VOLUME ["/home/bitfuckit/.config/bitfuckit"]
ENTRYPOINT ["/usr/local/bin/bitfuckit"]
CMD ["--help"]
LABEL org.opencontainers.image.title="bitfuckit"
LABEL org.opencontainers.image.description="The Bitbucket CLI Atlassian never made"
LABEL org.opencontainers.image.version="0.2.0-alpine"