-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove old Vulkan "default" Dockerfile (which was never intended to get
special treatment). Add new Vulkan Dockerfile using current versions of the toolchain and hijacking some of @rpavlik's script to allow setting the user/group at docker invocation.
- Loading branch information
Showing
7 changed files
with
98 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2019 The Khronos Group Inc. | ||
# Copyright (c) 2019-2020 The Khronos Group Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -14,12 +14,16 @@ | |
|
||
# This is a Docker container for Vulkan specification builds | ||
|
||
from ruby:2.6 | ||
from ruby:2.7 | ||
label maintainer="Jon Leech <[email protected]>" | ||
|
||
# Install standard Debian packages | ||
# TODO add --no-install-recommends | ||
run apt-get update -qq && apt-get install -y -qq \ | ||
# This adds the Node.js repository to the apt registry | ||
# nodejs is actually installed in the next step | ||
run curl -sL https://deb.nodesource.com/setup_12.x | bash - | ||
|
||
# Install required Debian packages | ||
run apt-get update -qq && \ | ||
apt-get install -y -qq --no-install-recommends \ | ||
bison \ | ||
build-essential \ | ||
cmake \ | ||
|
@@ -29,6 +33,7 @@ run apt-get update -qq && apt-get install -y -qq \ | |
gcc \ | ||
ghostscript \ | ||
git \ | ||
gosu \ | ||
g++ \ | ||
jing \ | ||
libcairo2-dev \ | ||
|
@@ -37,34 +42,35 @@ run apt-get update -qq && apt-get install -y -qq \ | |
libpango1.0-dev \ | ||
libreadline-dev \ | ||
libxml2-dev \ | ||
nodejs \ | ||
pdftk \ | ||
poppler-utils \ | ||
python3 \ | ||
python3-pytest \ | ||
python3-termcolor \ | ||
ruby \ | ||
ttf-lyx && \ | ||
apt-get clean | ||
|
||
# Force-install an older version of i18n so the 1.5.2 version, which | ||
# won't work with ruby 2.1, doesn't abort the CI job when installing | ||
# other gems which need it. | ||
run gem install i18n -v 1.5.1 | ||
run gem install asciidoctor asciidoctor-mathematical coderay json-schema | ||
tcsh && \ | ||
apt-get clean && \ | ||
gem install \ | ||
asciidoctor \ | ||
asciidoctor-diagram \ | ||
asciidoctor-mathematical \ | ||
asciidoctor-pdf \ | ||
coderay \ | ||
json-schema \ | ||
i18n | ||
|
||
# Install chunked index generation scripts and add lunr to node searchpath | ||
run curl -sL https://deb.nodesource.com/setup_8.x | bash - | ||
run apt-get update -qq && apt-get install -y nodejs && apt-get clean | ||
run npm install -g [email protected] | ||
env NODE_PATH /usr/lib/node_modules | ||
|
||
# Install Roswell and asciidoctor-chunker. Need at least this specific | ||
# version (later may be OK, too) | ||
run curl -fsSL -o roswell.deb https://github.com/roswell/roswell/releases/download/v19.4.10.98/roswell_19.4.10.98-1_amd64.deb | ||
run dpkg -i roswell.deb | ||
run ros install alexandria lquery cl-fad | ||
run mkdir -p $HOME/common-lisp | ||
run (cd $HOME/common-lisp && git clone https://github.com/wshito/asciidoctor-chunker.git) | ||
# version (later may be OK, too). There seems to be no roswell APT | ||
# repository. | ||
run curl -fsSL -o roswell.deb https://github.com/roswell/roswell/releases/download/v20.01.14.104/roswell_20.01.14.104-1_amd64.deb && \ | ||
dpkg -i roswell.deb && \ | ||
ros install alexandria lquery cl-fad && \ | ||
mkdir -p $HOME/common-lisp && \ | ||
(cd $HOME/common-lisp && git clone https://github.com/wshito/asciidoctor-chunker.git) | ||
|
||
# Ensure the proper locale is installed and used - not present in ruby image | ||
# See https://serverfault.com/questions/54591/how-to-install-change-locale-on-debian#54597 | ||
|
@@ -74,3 +80,11 @@ run apt-get install -y -qq locales && \ | |
apt-get clean | ||
env LANG en_US.UTF-8 | ||
|
||
# Should move back to Debian packages stage above once CI works | ||
run apt-get install -y -qq --no-install-recommends bash | ||
|
||
# Add the entrypoint to the image | ||
COPY entrypoint.vulkan.sh /root/entrypoint.vulkan.sh | ||
RUN chmod +x /root/entrypoint.vulkan.sh | ||
|
||
ENTRYPOINT ["/root/entrypoint.vulkan.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2019 The Khronos Group, Inc. | ||
# Copyright (c) 2019 Collabora, Ltd | ||
# Copyright (c) 2017-2018 Sensics, Inc. | ||
# Copyright (c) 2014 Kyle Manna | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Based in part on: | ||
# https://github.com/kylemanna/docker-aosp/blob/master/utils/docker_entrypoint.sh | ||
# https://github.com/sensics/tegra-android-builder/blob/master/content/docker_entrypoint.sh | ||
|
||
set -e | ||
|
||
# Run this container with a non-root user, optionally specified by the | ||
# external environment variables USERID, GROUPID, USER, and GROUP. | ||
USERID=${USERID-1000} | ||
GROUPID=${GROUPID-100} | ||
USER=${USER-vulkan} | ||
GROUP=${GROUP-users} | ||
|
||
if egrep -q ":$GROUPID:|^$GROUP:" /etc/group ; then | ||
true | ||
# echo "** Not creating group $GROUP id $GROUPID; group line is" | ||
# egrep ":$GROUPID:|^$GROUP:" /etc/group | ||
else | ||
echo "** Creating group $GROUP id $GROUPID" | ||
groupadd -g $GROUPID -r $GROUP > /dev/null || true | ||
fi | ||
|
||
if egrep -q ":$USERID:|^$USER:" /etc/passwd ; then | ||
true | ||
# echo "** Not creating user $USER id $USERID; passwd line is" | ||
# egrep ":$USERID:|^$USER:" /etc/passwd | ||
else | ||
echo "** Creating user $USER id $USERID" | ||
useradd -u $USERID --create-home -r -g $GROUP $USER || true | ||
fi | ||
|
||
export HOME=/home/$USER | ||
export USER | ||
|
||
echo "HOME=$HOME USER=$USER CONTAINER_CWD=$CONTAINER_CWD" | ||
|
||
if [ "${CONTAINER_CWD}" ]; then | ||
cd ${CONTAINER_CWD} | ||
fi | ||
|
||
# Default to 'bash' if no arguments are provided | ||
args="$@" | ||
if [ -z "$args" ]; then | ||
args=/bin/bash | ||
else | ||
# Actually, always use it, because CI appears to be passing in some horrid bash script as the arguments | ||
echo -n "** ignoring entrypoint.vulkan.sh args - length was " | ||
echo $args | wc -c | ||
args=/bin/bash | ||
fi | ||
|
||
echo "** About to gosu $USER $args" | ||
exec gosu $USER $args | ||
echo "** After gosu - should not reach this point" |