-
Notifications
You must be signed in to change notification settings - Fork 141
/
Dockerfile
34 lines (24 loc) · 1013 Bytes
/
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
34
ARG GO_IMAGE
ARG BUILD_IMAGE=ubuntu:cosmic
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO ubuntu
ENV SUITE cosmic
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]