Skip to content

Commit

Permalink
feat(build): Support additional pre-launch commands in image
Browse files Browse the repository at this point in the history
This makes it possible for users to hook basically arbitrary things
into the Nixery container image.
  • Loading branch information
tazjin authored and Vincent Ambo committed Aug 4, 2019
1 parent 5a22294 commit 504546d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 504546d

Please sign in to comment.