-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
33 lines (30 loc) · 1.23 KB
/
Dockerfile
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
FROM golang:alpine3.8 AS build-base
RUN apk add --update --no-cache gcc musl-dev make git
FROM build-base AS slirp4netns
RUN apk add --update --no-cache git autoconf automake linux-headers
ARG SLIRP4NETNS_VERSION
WORKDIR /
RUN git clone https://github.com/rootless-containers/slirp4netns.git \
&& cd slirp4netns \
&& git checkout $SLIRP4NETNS_VERSION
WORKDIR /slirp4netns
RUN ./autogen.sh \
&& LDFLAGS=-static ./configure --prefix=/usr \
&& make
FROM build-base AS cnitool
ADD vendor/github.com/containernetworking/cni /work/src/github.com/containernetworking/cni
ARG LDFLAGS="-extldflags '-static'"
ARG CGO_ENABLED=0
ARG GOOS=linux
ENV GOPATH /work
WORKDIR /work
RUN go build -o /cnitool -a -ldflags "${LDFLAGS}" github.com/containernetworking/cni/cnitool \
&& rm -rf /root/.cache/*
FROM build-base AS liteide
ARG LITEIDE_PKGS="g++ qt5-qttools qt5-qtbase-dev qt5-qtbase-x11 qt5-qtwebkit xkeyboard-config libcanberra-gtk3 adwaita-icon-theme ttf-dejavu"
RUN apk add --update --no-cache ${LITEIDE_PKGS} || /usr/lib/qt5/bin/qmake -help >/dev/null
RUN git clone https://github.com/visualfc/liteide.git \
&& cd liteide/build \
&& ./update_pkg.sh && QTDIR=/usr/lib/qt5 ./build_linux.sh \
&& rm -rf /usr/local/bin \
&& ln -s `pwd`/liteide/bin /usr/local/bin