Commit Graph

80 Commits

Author SHA1 Message Date
James Westby 6309b17069 Add shellcheck to catch bad shell code 2019-10-04 16:01:31 +01:00
John Kristensen 449decc476 Use deb.debian.org
The httpredir.debian.org service has been dropped in favour of
deb.debian.org

ref: https://lists.debian.org/debian-mirrors/2017/02/msg00000.html
2019-10-04 15:29:47 +01:00
James Westby c6b8578e09 [buildone] fix mistaken use of continue
When I moved this code in to its own script, I moved it
out of a loop, so we can no longer `continue` and should
`return` instead.
2019-10-04 15:02:38 +01:00
James Westby b4db65f619 [mkimage] Clean hostname and resolv.conf
These depend on the build environment, but differences
don't show up inside the docker image as docker sets the
content of these files when starting a container.

We can put static values in the files to stop the image
layers differing without affecting the running containers
in any way.

This wasn't caught by the reproducibility check as the values
will be pretty static when built on the same host. (hostname
will be fixed, and resolv.conf will only change if the networking
configration changes enough, and that is unlikely to happen)
2019-10-01 15:19:48 +01:00
James Westby dc6a22375b Fix reproducible builds by fixing date in /etc/shadow
The builds were reproducible provided they were done on the same day.

However if they were done on different days they had different dates
in /etc/shadow and so changed. This meant that the images were
updated every day, and sometimes the reproducibility check would
fail if the day ticked over between the builds.
2019-09-30 12:29:49 +02:00
James Westby 4881871bd0 Split out a buildone script
This makes it easier to test all the code around the building
of an image as you can just build one image.
2019-09-27 13:27:54 +02:00
James Westby e64c3dd071 Include dockerdiff output in the log
When this happens in travis the intermediate images
aren't pushed, so you have to rebuild locally.

The dockerdiff output may be large, but that's more useful
than having to try and reproduce locally.
2019-09-25 12:49:47 +02:00
James Westby 52253ec27f Set buster as latest
Buster is the latest Debian release, so point the `latest` tag to it.
2019-08-19 15:31:02 +02:00
Filippo Giunchedi 2c4b4f0f14 Add Buster
Tweak the tests so that they use default-mysql-server
on newer dists as it replaced the mysql-server package.

Also add explicit import of the buster signing key
as the Travis agent doesn't have it available.

Thanks to Filippo Giunchedi (@filippog) for the initial
work on this.
2019-07-11 16:11:35 +02:00
Alejandro Ruiz 8367d275c8 Enable content trust only when pushing to DockerHub (#57)
The result of pushing to GCR or Quay.io with content trust enabled is unknown, so I rather avoid it for now.
2018-09-20 14:06:07 +02:00
Joseda Rios 76256c1844 Decode key value (#56)
* Decode key value

The docker content trust repository key is base64-encoded, so let's decode it before dumping it to a file

* decode option is `-d` in Linux
2018-09-20 12:10:21 +02:00
Joseda Rios f1fd3b7679 fix key permissions (#55)
We found this issue in the travis build:

```
refusing to load key from /tmp/tmp.7IS3P9lCpg/key: private key file /tmp/tmp.7IS3P9lCpg/key must not be readable or writable by others
```

Making the file readable by the running user should fix the proble
2018-09-20 10:49:14 +02:00
Alejandro Ruiz edb388d354 Fix pushall script (#54)
The code tries to avoid the contents to be printed in the output in case the shell tracing is enabled at some point, but that implementation also makes the `tmpdir` variable not to be accessible in that context.
2018-09-19 17:36:36 +02:00
Alejandro Ruiz 883d28ccad Enable signing of images to push process (#53)
This change enables Docker Content Trust for the tags being pushed.

I configured Travis to set the required key and passphrase.

Fixes #48.
2018-09-19 16:45:07 +02:00
Alejandro Ruiz c3b5ba1143 Print docker version used by TravisCI (#52) 2018-09-12 18:12:24 +02:00
Joseda Rios dc7e90fab1 add extras-base to the minideb derived list (#50)
As we now are we building an additional minideb variant, we want update it on publish
2018-08-01 14:47:57 +02:00
Tomas Pizarro c0c0ea9da1 Merge pull request #47 from tompizmor/fix_ci
Increase test timeout
2018-04-20 17:45:32 +02:00
tompizmor f2eb426c2e Increase test timeout 2018-04-20 16:28:51 +02:00
Beltran 7211ad61a1 Remove Slack channel 2018-04-10 14:31:26 +02:00
Beltran 1df3ecbb17 Remove slack channel 2018-04-10 14:24:48 +02:00
Jorge Marin e0b4e23168 Use repo digest instead of image id for external image identification (#46) 2018-03-15 15:01:12 +01:00
Jorge Marin cc2266fd02 Wait for the apt.daily service to finish instead of killing it avoiding bad state (#45) 2018-03-14 10:34:51 +01:00
Jorge Marin 74b802b9b2 Fix for Travis build failures due to running apt cron service (#44) 2018-03-13 13:29:42 +01:00
Jorge Marin 32f0aae723 Update minideb-extras and minideb-runtimes each time minideb is pushed (#43) 2018-03-08 18:35:14 +01:00
James Westby 0f008379a9 Increase the timeout on the fail test
It seems like the build has been failing frequently
recently, apparently timing out during this test.

Increase the timeout to compensate.
2018-02-28 18:32:50 +00:00
Sameer Naik ac57829719 travis: process build on a xenial vm, fixes debian:unstable builds (#39) 2017-12-21 21:18:51 +05:30
James Westby 7df2db746c Fix arguments to gcloud docker
gcloud became more strict about separating gcloud arguments
from docker arguments, and is now throwing an error failing
the build https://travis-ci.org/bitnami/minideb/jobs/246281633#L5140

Use `--` to separate the arguments.
2017-06-26 11:18:16 +01:00
James Westby fad19490cb Add stretch and make it default
Stretch was just released: https://www.debian.org/News/2017/20170617

Closes #32
2017-06-19 08:23:41 +01:00
Tuna 79752bbb14 Merge pull request #27 from ngtuna/Readme
update readme
2017-06-03 14:45:49 +07:00
Tuna 91d732ce23 fix typo on README 2017-06-03 14:36:54 +07:00
Tuna 3767e80b62 add make to build section 2017-06-01 16:44:48 +07:00
Tuna 3e1dfb4d7d update readme 2017-06-01 16:44:48 +07:00
Tuna b47a442c97 update readme 2017-06-01 16:44:47 +07:00
Tuna b23aee5fe2 Merge pull request #30 from ngtuna/Makefile
add Makefile
2017-06-01 16:42:09 +07:00
Tuna d655c817b4 update Makefile
- add stamp file
- add pattern target
2017-06-01 16:33:37 +07:00
Tuna f4ad93a8cd add Makefile 2017-05-31 15:30:24 +07:00
Tuna 368d0e47b4 add LICENSE (#28) 2017-05-30 11:39:51 +00:00
Adnan Abdulhussein 7cae900695 Merge pull request #26 from ngtuna/badges
add travis, slack badges
2017-05-25 09:28:18 +01:00
Tuna f837bc1eb2 add travis, slack badges 2017-05-25 13:02:40 +07:00
Sameer Naik 812bab633b Merge branch 'fix-quay-login' 2017-05-23 16:21:33 +05:30
Sameer Naik d164a63885 fixes quay.io login 2017-05-23 16:20:37 +05:30
Sameer Naik 30a380bc0c Merge branch 'docker_login' 2017-05-23 16:02:23 +05:30
Sameer Naik 14f98b939c remove -e argument from docker login 2017-05-23 16:01:56 +05:30
Sameer Naik 6152766c32 Merge branch 'mirror-quayio' 2017-05-23 15:45:12 +05:30
Sameer Naik 9a0d628cca push minideb image builds to quay.io/bitnami/minideb 2017-05-23 15:25:50 +05:30
Simon Bennett 7b392e9987 Mention other images that use this as a base
Mention some other container images that use minideb so people know they don't have to reinvent the wheel if they don't want to.
2017-04-20 11:02:00 -07:00
James Westby 5e09a4cbc4 Install bsd utils to get logger
This is needed to install the mysql-server package. Fixes #16.
2017-02-27 17:08:09 +00:00
James Westby 3916090dd0 Install ncurses-base to get terminfo files.
It's an essential package designed for exactly this.
It's pretty small, so not a huge cost to putting it back in.

The problem is pervasive enough, and it's unlikely that
users will know how to fix it, that it's worth us solving
it in the base image.
2017-02-23 15:26:42 +00:00
James Westby 44030c910b Make the image build reproducible
Change the mkimage script so that the produced image is
reproducible. This involves:

   - removing the ldconfig aux-cache as it changes on every build.
   - set the mtimes of the files to a specific date so that the
     resulting tar file will have the same contents.
   - The `strings` guard around the unsafe-io tweak seems to be
     non-deterministic. It was sometimes not adding the tweak
     for the same file. Remove it as we don't care about older
     than jessie.
   - Importing the image by constructing a docker image with
     a specific timestamp and doing `docker load`.

Also change the buildall script to build each image twice and
confirm that the same tarball is produced, and that results
in the layers in the imported images matching.

Add a dockerdiff script that checks that two images are equivalent,
and tries to show the differences if not. This is useful when the
build script reports differences, as it can point to what the
differences are.
2017-02-10 11:48:28 +00:00
James Westby 6befeedf99 Refactor pushall to use a single loop 2017-02-10 11:48:28 +00:00