about summary refs log tree commit diff
path: root/Containerfile.alpine
blob: 57205f93a6393111969a8ab4724310017ed1ccf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM alpine:latest

RUN apk update \
    && apk --no-cache --update add build-base

WORKDIR /work

COPY nitro.c .
COPY nitroctl.c .
COPY Makefile .

RUN make CFLAGS="-Os -Wl,--gc-sections -fno-asynchronous-unwind-tables -fno-stack-protector -fno-stack-clash-protection" LDFLAGS="-static"

VOLUME /out

RUN nm --size-sort nitro
RUN ls -l nitro nitroctl
RUN size nitro nitroctl

RUN cp nitro nitroctl /out