@@ -61,9 +61,10 @@ as `busybox`.
6161
6262Firstly, we define some settings. These name utility images used later:
6363
64- curl = 'appropriate/curl'
64+ curl = 'appropriate/curl:3.1 '
6565 jq = 'local_tools/jq'
6666 git = 'local_tools/git'
67+ busybox = 'busybox:latest'
6768
6869We also determine where the results will be stored:
6970
@@ -216,7 +217,7 @@ Finally, after testing and optionally pushing the image to the repository the
216217generated files should be removed, to make room for the next package.
217218
218219 inv.task('clean:' .. package .. ':' .. revision)
219- .using('alpine')
220+ .using('alpine:latest ')
220221 .withHostConfig({binds = {builddir .. ':/data'}})
221222 .run('rm', '-rf', '/data/dist', '/data/info')
222223
@@ -311,7 +312,7 @@ and the final image is generated by wrapping the `dist` directory on top of
311312` progrium/busybox ` (a glibc-based build).
312313
313314 inv.task('build:' .. package .. ':' .. revision)
314- .using('continuumio/miniconda')
315+ .using('continuumio/miniconda:latest ')
315316 .withConfig({entrypoint = {"/bin/sh", "-c"}})
316317 .withHostConfig({binds = condaBinds})
317318 .run(install .. package .. '=' .. conda_version
@@ -320,15 +321,15 @@ and the final image is generated by wrapping the `dist` directory on top of
320321 .withHostConfig({binds = condaBinds})
321322 .run(transformInfo)
322323 .wrap(builddir .. '/dist').at('/usr/local')
323- .inImage('progrium/busybox')
324+ .inImage('progrium/busybox:latest ')
324325 .as(repo)
325326
326327### Cleaning up
327328
328329For Conda, clean up consists of removing the destination and information directories.
329330
330331 inv.task('clean:' .. package .. ':' .. revision)
331- .using('continuumio/miniconda')
332+ .using('continuumio/miniconda:latest ')
332333 .withConfig({entrypoint = {"/bin/sh", "-c"}})
333334 .withHostConfig({binds = {builddir .. ':/data'}})
334335 .run('rm -rf /data/dist /data/info')
@@ -405,15 +406,15 @@ the output files.
405406 .run('$BREW test ' .. package)
406407 .run(extractInfo)
407408
408- .wrap(builddir .. '/dist').inImage('mwcampbell/muslbase-runtime')
409+ .wrap(builddir .. '/dist').inImage('mwcampbell/muslbase-runtime:latest ')
409410 .at("/brew/").as(repo)
410411
411412### Cleaning up
412413
413414This step removes all files generated during the run. It is run as the user ` root ` :
414415
415416 inv.task('clean:' .. package .. ':' .. revision)
416- .using('thriqon/linuxbrew-alpine ')
417+ .using('local_tools/linuxbrew_builder ')
417418 .withConfig({user = "root"})
418419 .withHostConfig({binds = {builddir .. ':/data'}})
419420 .run('rm', '-rf', '/data/dist', '/data/info')
@@ -475,7 +476,7 @@ repository. The socket for the Docker instance on the host is mounted into the
475476container, as well as the configuration directory. The latter is needed to
476477authenticate ourselves against Quay.io.
477478
478- .using('docker')
479+ .using('docker:latest ')
479480 .withHostConfig({
480481 binds = {
481482 "/var/run/docker.sock:/var/run/docker.sock",
@@ -525,7 +526,7 @@ However, we have to make sure that the file containing 'old' revisions exists in
525526the package information directory. If any old revisions exist, they are copied over,
526527otherwise a new array is used.
527528
528- .using(' busybox' )
529+ .using(busybox)
529530 .withHostConfig({binds = {
530531 builddir .. ':/pkg',
531532 './data:/data'
@@ -668,7 +669,7 @@ and store a single JSON object assinging a list of versions to each package.
668669 local parseGithubImages = 'map({(.image): (.versions | map(.revision))}) | add // {}'
669670
670671 inv.task('main:versions:process_versions_from_github')
671- .using(' busybox' )
672+ .using(busybox)
672673 .run('/bin/sh', '-c', 'tail -q -n +3 data/api/_images/*json > data/github_jsons.jsonl || touch data/github_jsons.jsonl')
673674 .using(jq)
674675 .run('/jq-linux64 --slurp \'' .. parseGithubImages .. '\' data/github_jsons.jsonl > data/github_versions')
@@ -704,15 +705,15 @@ exactly one line.
704705The data directory will contain all data concerning the whole build process.
705706
706707 inv.task('main:create_data_dir')
707- .using(' busybox' )
708+ .using(busybox)
708709 .run('mkdir', '-p', 'data')
709710
710711It is not possible to have the same package identifier with the same revision
711712occurring multiple times in the same ` packages.tsv ` . This check tests for any
712713duplicates and tells the user.
713714
714715 inv.task('main:check_uniqueness_of_keys')
715- .using(' busybox' )
716+ .using(busybox)
716717 .run('/bin/sh', '-c',
717718 -- fields 2 and 3 are package name and revision
718719 "cat packages.tsv | cut -f2-3 |"
@@ -737,7 +738,7 @@ If we are doing a production build on Travis, we have to store credentials for
737738GitHub (passed as environment variables) and commit/push the new API database.
738739
739740 inv.task('main:store_github_credentials')
740- .using(' busybox' )
741+ .using(busybox)
741742 .withConfig({env = {"TOKEN=" .. ENV.GITHUB_TOKEN}})
742743 .withHostConfig({binds = {"./data/api:/source"}})
743744 .run('/bin/sh', '-c', 'echo "https://${TOKEN}:@github.com" > .git/credentials')
@@ -767,26 +768,26 @@ Quite often in this tool, a generic image containing `jq` is needed. This image
767768is generated as follows:
768769
769770 inv.task('main:generate_image:jq')
770- .using(' busybox' )
771+ .using(busybox)
771772 .run('mkdir', '-p', 'jq')
772- .using('appropriate/ curl' )
773+ .using(curl)
773774 .run('--location',
774775 'https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64',
775776 '-o', 'jq/jq-linux64')
776- .using(' busybox' )
777+ .using(busybox)
777778 .run('chmod', 'a+x', 'jq/jq-linux64')
778779 .wrap('jq').at('/')
779780 .withConfig({entrypoint = {'/bin/sh', '-c'}})
780- .inImage(' busybox' ).as(jq)
781- .using(' busybox' )
781+ .inImage(busybox).as(jq)
782+ .using(busybox)
782783 .run('rm', '-rf', 'jq')
783784
784785## local_tools/git
785786
786787This image contains the ` git ` client:
787788
788789 inv.task('main:generate_image:git')
789- .using('alpine')
790+ .using('alpine:latest ')
790791 .run('mkdir', '-p', 'alpine-git')
791792 .run('apk', '--root', '/source/alpine-git',
792793 '--update-cache', '--repository',
@@ -796,8 +797,8 @@ This image contains the `git` client:
796797 .run('rm', '-rf', 'alpine-git/lib/apk', 'alpine-git/var/cache/apk/')
797798 .wrap('alpine-git').at('/').withConfig({
798799 entrypoint = {'/usr/bin/git'}
799- }).inImage('alpine').as(git)
800- .using('alpine')
800+ }).inImage('alpine:latest ').as(git)
801+ .using('alpine:latest ')
801802 .run('rm', '-rf', 'alpine-git')
802803
803804## local_tools/linuxbrew_builder
@@ -806,7 +807,7 @@ The builder image for `linuxbrew` is generated here. It contains everything
806807Linuxbrew expects from the compiling host.
807808
808809 inv.task('main:generate_image:linuxbrew_builder')
809- .using('alpine')
810+ .using('alpine:latest ')
810811 .run('mkdir', '-p', 'linuxbrew-alpine/brew', 'linuxbrew-alpine/tmp')
811812 .run('apk', '--root', '/source/linuxbrew-alpine',
812813 '--update-cache', '--repository',
@@ -818,16 +819,16 @@ Linuxbrew expects from the compiling host.
818819
819820 .using(git)
820821 .run('clone', 'https://github.com/Homebrew/linuxbrew', 'linuxbrew-alpine/brew')
821- .using('alpine')
822+ .using('alpine:latest ')
822823 .run('cp', '-r', 'linuxbrew-alpine/brew/bin', 'linuxbrew-alpine/brew/orig_bin')
823824 .run('/bin/sh', '-c',
824825 'find linuxbrew-alpine/brew -print0 | xargs -0 -n 1 chown nobody:users')
825826 .run('chown', 'nobody:users', 'linuxbrew-alpine/brew', 'linuxbrew-alpine/tmp')
826827 .run('rm', '-rf', 'linuxbrew-alpine/lib/apk', 'linuxbrew-alpine/var/cache/apk/')
827- .wrap('linuxbrew-alpine').inImage('alpine')
828+ .wrap('linuxbrew-alpine').inImage('alpine:latest ')
828829 .at('/').as('local_tools/linuxbrew_builder')
829830
830- .using('alpine')
831+ .using('alpine:latest ')
831832 .run('rm', '-rf', 'linuxbrew-alpine')
832833
833834## Article
@@ -837,7 +838,7 @@ is using `pandoc` to transform the Markdown source into LaTeX, which is then
837838compiled into PDF with ` xelatex ` .
838839
839840 inv.task('article')
840- .using('thriqon/full-pandoc')
841+ .using('thriqon/full-pandoc:latest ')
841842 .run('pandoc',
842843 '--standalone',
843844 '--toc',
@@ -846,7 +847,7 @@ compiled into PDF with `xelatex`.
846847 '--highlight-style=pygments',
847848 '-o', 'mulled.tex',
848849 '-i', 'invfile.lua.md')
849- .using('thriqon/xelatex-docker')
850+ .using('thriqon/xelatex-docker:latest ')
850851 .run('xelatex', 'mulled.tex')
851852
852853## Travis CI Build
@@ -893,13 +894,13 @@ the packages, the build environment has to be prepared:
893894 end
894895
895896 inv.task('main:netrc:trusted')
896- .using(' busybox' )
897+ .using(busybox)
897898 .withConfig({env = {"TOKEN=" .. ENV.GITHUB_TOKEN}})
898899 .run('/bin/sh', '-c', 'echo "machine github.com login $TOKEN password _" > data/netrc')
899900 .run('chmod', '0600', 'data/netrc')
900901
901902 inv.task('main:netrc:plain')
902- .using(' busybox' )
903+ .using(busybox)
903904 .run('/bin/sh', '-c', 'echo "machine github.com login mulled_bot password _" > data/netrc')
904905 .run('chmod', '0600', 'data/netrc')
905906
0 commit comments