-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (30 loc) · 799 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (30 loc) · 799 Bytes
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
# syntax=docker/dockerfile:1
FROM alpine:latest AS build
RUN apk update && apk add --no-cache \
clang \
cmake \
lldb-dev \
make \
mbedtls-dev \
mbedtls-static \
py3-lldb \
python3 \
&& rm -rf /var/lib/apt/lists/*
# Set Clang as the default C compiler
ENV CC=clang
WORKDIR /app
COPY CMakeLists.txt .
COPY Makefile .
COPY src ./src/
COPY test ./test/
COPY warudo.conf.default ./warudo.conf
# musl's unistd.h header is located at the system headers root folder,
# /usr/include, and not under /usr/include/sys as in glibc.
RUN echo "#include <unistd.h>" > /usr/include/sys/unistd.h
RUN make test
RUN make clean
RUN make build
# FROM alpine:latest
# WORKDIR /app
# COPY --from=build /app/build/src/warudo /app/warudo.conf ./
# ENTRYPOINT ["./build/src/warudo"]