Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Debain base to stretch #117

Merged
merged 5 commits into from
Jun 21, 2018
Merged

Conversation

J0WI
Copy link
Contributor

@J0WI J0WI commented Jun 8, 2018

@J0WI J0WI changed the title Adjust gpg code to kill daemons, cutting down on race conditions Update Debain base to stretch Jun 9, 2018
@yosifkit
Copy link
Member

@J0WI
Copy link
Contributor Author

J0WI commented Jun 11, 2018

Wait a minute... It builds successfully on my machine:

$ git status
On branch gpg-race
nothing to commit, working tree clean
$ docker build --no-cache --pull 3.4/ >> build.log 2>&1
$ docker build --pull 3.4/ >> cached.log 2>&1

Sadly GitHub can't handle the full log, so here is just the cached one 😞

cached.log
Sending build context to Docker daemon   12.8kB


Step 1/19 : FROM ruby:2.4-slim-stretch
2.4-slim-stretch: Pulling from library/ruby
Digest: sha256:2887c74721f64e4b1864ad1699434229e7543c4c8b09cd0779bab7aa87ea2099
Status: Image is up to date for ruby:2.4-slim-stretch
 ---> 252ad923f95e
Step 2/19 : RUN groupadd -r redmine && useradd -r -g redmine redmine
 ---> Using cache
 ---> 6d2215a946a0
Step 3/19 : RUN apt-get update && apt-get install -y --no-install-recommends 		ca-certificates 		dirmngr 		gnupg 		wget 	&& rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 40b70201b592
Step 4/19 : ENV GOSU_VERSION 1.10
 ---> Using cache
 ---> 4cae272b3c95
Step 5/19 : RUN set -x 	&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" 	&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" 	&& export GNUPGHOME="$(mktemp -d)" 	&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 	&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu 	&& gpgconf --kill all 	&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc 	&& chmod +x /usr/local/bin/gosu 	&& gosu nobody true
 ---> Using cache
 ---> 1f17883d0a84
Step 6/19 : ENV TINI_VERSION v0.16.1
 ---> Using cache
 ---> 3189a6d62c12
Step 7/19 : RUN set -x 	&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture)" 	&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture).asc" 	&& export GNUPGHOME="$(mktemp -d)" 	&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 	&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini 	&& gpgconf --kill all 	&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc 	&& chmod +x /usr/local/bin/tini 	&& tini -h
 ---> Using cache
 ---> 18e7ae453e41
Step 8/19 : RUN apt-get update && apt-get install -y --no-install-recommends 		bzr 		git 		mercurial 		openssh-client 		subversion 	&& rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 8557d3781c9d
Step 9/19 : ENV RAILS_ENV production
 ---> Using cache
 ---> da666bdae071
Step 10/19 : WORKDIR /usr/src/redmine
 ---> Using cache
 ---> 6c7d9be42239
Step 11/19 : ENV REDMINE_VERSION 3.4.5
 ---> Using cache
 ---> 15c3a57937c8
Step 12/19 : ENV REDMINE_DOWNLOAD_MD5 1c61ccbf3f597ebceefb05b60cc1947b
 ---> Using cache
 ---> fb7ffb7b7bbd
Step 13/19 : RUN wget -O redmine.tar.gz "https://www.redmine.org/releases/redmine-${REDMINE_VERSION}.tar.gz" 	&& echo "$REDMINE_DOWNLOAD_MD5 redmine.tar.gz" | md5sum -c - 	&& tar -xvf redmine.tar.gz --strip-components=1 	&& rm redmine.tar.gz files/delete.me log/delete.me 	&& mkdir -p tmp/pdf public/plugin_assets 	&& chown -R redmine:redmine ./
 ---> Using cache
 ---> 56a670c56a8d
Step 14/19 : RUN set -eux; 		apt-mark auto 		dirmngr 		gnupg 	; 	savedAptMark="$(apt-mark showmanual)"; 	apt-get update; 	apt-get install -y --no-install-recommends 		freetds-dev 		gcc 		libmagickcore-dev 		libmagickwand-dev 		libmariadbclient-dev 		libpq-dev 		libsqlite3-dev 		libssl1.0-dev 		make 		patch 	; 	rm -rf /var/lib/apt/lists/*; 		bundle install --without development test; 	for adapter in mysql2 postgresql sqlserver sqlite3; do 		echo "$RAILS_ENV:" > ./config/database.yml; 		echo "  adapter: $adapter" >> ./config/database.yml; 		bundle install --without development test; 		cp Gemfile.lock "Gemfile.lock.${adapter}"; 	done; 	rm ./config/database.yml; 		apt-mark auto '.*' > /dev/null; 	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; 	find /usr/local -type f -executable -exec ldd '{}' ';' 		| awk '/=>/ { print $(NF-1) }' 		| sort -u 		| grep -v '^/usr/local/' 		| xargs -r dpkg-query --search 		| cut -d: -f1 		| sort -u 		| xargs -r apt-mark manual 	; 	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
 ---> Using cache
 ---> 4edc4f6d8792
Step 15/19 : VOLUME /usr/src/redmine/files
 ---> Using cache
 ---> 0f010a4c0453
Step 16/19 : COPY docker-entrypoint.sh /
 ---> Using cache
 ---> 3aae67cd9522
Step 17/19 : ENTRYPOINT ["/docker-entrypoint.sh"]
 ---> Using cache
 ---> 4443829cceae
Step 18/19 : EXPOSE 3000
 ---> Using cache
 ---> 29ba5d8b0cae
Step 19/19 : CMD ["rails", "server", "-b", "0.0.0.0"]
 ---> Using cache
 ---> 303d877116b7
Successfully built 303d877116b7

@yosifkit
Copy link
Member

Strange, it worked here too.

3.3/Dockerfile Outdated
apt-mark auto \
dirmngr \
gnupg \
; \
Copy link
Member

Choose a reason for hiding this comment

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

These lines won't save any space anyway, they should just be dropped. If we want to be able to remove them cleanly they would have to be installed and removed in the layer that they are used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I filled #122 for the testing issue.

@tianon tianon force-pushed the gpg-race branch 2 times, most recently from caeffe0 to 8f31913 Compare June 20, 2018 21:29
@tianon
Copy link
Member

tianon commented Jun 20, 2018

From the Travis backtrace, it's trying to download FreeTDS via FTP, and failing... 😱

/usr/local/lib/ruby/2.4.0/net/protocol.rb:176:in `rbuf_fill': Net::ReadTimeout
(Net::ReadTimeout)
	from /usr/local/lib/ruby/2.4.0/net/protocol.rb:154:in `readuntil'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:1447:in `gets'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:1452:in `readline'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:435:in `getline'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:447:in `getmultiline'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:464:in `getresp'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:497:in `block in sendcmd'
	from /usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:495:in `sendcmd'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:554:in `transfercmd'
from /usr/local/lib/ruby/2.4.0/net/ftp.rb:636:in `block (2 levels) in
retrbinary'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:310:in `with_binary'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:634:in `block in retrbinary'
	from /usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
	from /usr/local/lib/ruby/2.4.0/net/ftp.rb:633:in `retrbinary'
	from /usr/local/lib/ruby/2.4.0/open-uri.rb:796:in `buffer_open'
	from /usr/local/lib/ruby/2.4.0/open-uri.rb:212:in `block in open_loop'
	from /usr/local/lib/ruby/2.4.0/open-uri.rb:210:in `catch'
	from /usr/local/lib/ruby/2.4.0/open-uri.rb:210:in `open_loop'
	from /usr/local/lib/ruby/2.4.0/open-uri.rb:151:in `open_uri'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:523:in
`block in download_file_ftp'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:535:in
`with_tempfile'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:504:in
`download_file_ftp'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:435:in
`download_file'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:54:in
`block in download'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:53:in
`each'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:53:in
`download'
from
/usr/local/bundle/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:150:in
`cook'
	from extconf.rb:128:in `block in cook_and_activate'
	from extconf.rb:120:in `block in chdir_for_build'
	from extconf.rb:119:in `chdir'
	from extconf.rb:119:in `chdir_for_build'
	from extconf.rb:127:in `cook_and_activate'
	from extconf.rb:321:in `<main>'

@J0WI
Copy link
Contributor Author

J0WI commented Jun 20, 2018

ftp.freetds.org resolves to different endpoints. That's might be the cause why it's working locally for e and @yosifkit.

@yosifkit
Copy link
Member

yosifkit commented Jun 21, 2018

Some protocols such as FTP and SMTP are not directly supported due to the infrastructure requirements in place for security and fair usage.

https://docs.travis-ci.com/user/common-build-problems/#FTP-SMTP-other-protocol-does-not-work

Seems like it might be: travis-ci/travis-ci#9391

@tianon
Copy link
Member

tianon commented Jun 21, 2018

Ok, did a bit more research, added many more links as comments, and it's green. 👍

@yosifkit yosifkit merged commit f866986 into docker-library:master Jun 21, 2018
@J0WI J0WI deleted the gpg-race branch June 21, 2018 22:14
@yosifkit
Copy link
Member

Just noticed that this has the same change as docker-library/php#666 but wasn't linked to 'Add "pgp-happy-eyeballs" in Travis to help cut down on gpg-related issues'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants