File: Dockerfile

package info (click to toggle)
osslsigncode 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,144 kB
  • sloc: ansic: 12,446; python: 982; sh: 74; makefile: 12; javascript: 1
file content (32 lines) | stat: -rw-r--r-- 788 bytes parent folder | download | duplicates (3)
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
# Stage 1: Build osslsigncode on Alpine
FROM alpine:latest AS builder

# Install build dependencies
RUN apk add --no-cache build-base cmake openssl-dev zlib-dev

# Copy osslsigncode source code into the image
COPY . /source

# Build osslsigncode
RUN cd /source && \
    mkdir -p build && \
    cd build && \
    rm -f CMakeCache.txt && \
    cmake -S .. && \
    cmake --build . && \
    cmake --install .

# Stage 2: Create final image without build environment
FROM alpine:latest

# Copy compiled binary from builder stage
COPY --from=builder /usr/local/bin/osslsigncode /usr/local/bin/osslsigncode

# Install necessary runtime libraries (latest version)
RUN apk add --no-cache libcrypto3

# Set working directory
WORKDIR /workdir

# Declare volume to mount files
VOLUME [ "/workdir" ]