feat(build): Support additional pre-launch commands in image

This makes it possible for users to hook basically arbitrary things
into the Nixery container image.
This commit is contained in:
Vincent Ambo 2019-08-04 00:48:52 +01:00 committed by Vincent Ambo
parent 20103640fa
commit a0d7d693d3

View file

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {}
, preLaunch ? "" }:
with pkgs;
@ -88,6 +89,8 @@ rec {
mkdir -p /etc/nix
echo 'sandbox = false' >> /etc/nix/nix.conf
${preLaunch}
exec ${nixery-bin}/bin/nixery
'';
in dockerTools.buildLayeredImage {