Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME

test_steps = [
'deb': { ->
stage('Ubuntu Xenial Debian Package') {
stage('Ubuntu Xenial and Focal Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
try {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial')
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial ubuntu-focal')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-engine')
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This repository is solely maintained by Docker, Inc.

The scripts will build for this list of packages types:

* DEB packages for Ubuntu 20.04 Focal
* DEB packages for Ubuntu 19.10 Eoan
* DEB packages for Ubuntu 19.04 Disco
* DEB packages for Ubuntu 18.10 Cosmic
Expand Down
2 changes: 1 addition & 1 deletion deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN?=docker run --rm \
debbuild-$@/$(ARCH)

DEBIAN_VERSIONS := debian-stretch debian-buster
UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco ubuntu-eoan
UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco ubuntu-eoan ubuntu-focal
RASPBIAN_VERSIONS := raspbian-stretch raspbian-buster
DISTROS := $(DEBIAN_VERSIONS) $(UBUNTU_VERSIONS) $(RASPBIAN_VERSIONS)

Expand Down
41 changes: 41 additions & 0 deletions deb/ubuntu-focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ARG GO_IMAGE
ARG DISTRO=ubuntu
ARG SUITE=focal
ARG BUILD_IMAGE=${DISTRO}:${SUITE}

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

ARG DEBIAN_FRONTEND=noninteractive
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in eoan's dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct; it's needed with Ubuntu 20.04 and up

They changed the contents of the devscripts package to include tzutils, which doesn't install otherwise (waiting for input to set your timezone); docker/containerd-packaging#142 (comment)

And https://twitter.com/thaJeztah/status/1242413653913108480?s=20

Screenshot 2020-04-11 at 02 08 40

Copy link
Copy Markdown
Contributor

@DeeDeeG DeeDeeG Apr 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also experienced this and can confirm. As described in that comment linked above, the build hangs in the apt-get install step. tzdata wants you to select a time zone with the keyboard, but there is no way to actually select one, even manually. (And certainly CI can't rely on human input, even if you could do it manually.)

Presumably, the DEBIAN_FRONTEND=noninteractive lets the package configure this setting itself, using a default timezone value perhaps. In any case, it successfully works around the hang.

Edit to add:

Snippet of the problem (click to expand)
Setting up tzdata (2019c-3ubuntu1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area:

(Install is hung at this point. Typing "[some number from 1 - 13]" and "Enter" does nothing.)

RUN apt-get update && apt-get install -y curl devscripts equivs git

ENV GOPROXY=direct
ENV GO111MODULE=off
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
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}

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"]