Skip to content

Commit bca07f7

Browse files
committed
Update docker image to be org/user independent and remove deprecated ref ext
1 parent 0cb8ddf commit bca07f7

File tree

7 files changed

+11
-29
lines changed

7 files changed

+11
-29
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2018 Bogdan Padalko <zaq178miami@gmail.com>
3+
Copyright (c) 2018 Bogdan Padalko <thepinepain@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Common docker containers, used for development.
44

55
## Images
66
- libv8
7+
- php-v8
78

89
## License
910

libv8/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## Usage
44

55
While this image is supposed to be a service image, you can give a try to `d8` shell by running
6-
`docker run -it pinepain/libv8 /opt/libv8/d8`
6+
`docker run -it libv8 /opt/libv8/d8`
77

88
All `libv8` files are located under `/opt/libv8` directory.
99

1010
To fetch specific `libv8` version, use docker image tagged with that version.
1111

1212
## Purpose
1313

14-
This image supposed to be used for [php-v8](https://github.com/pinepain/php-v8). I don't build image for every v8 tag, so
14+
This image supposed to be used for [php-v8](https://github.com/phpv8/php-v8). I don't build image for every v8 tag, so
1515
if you are urgently need some specific version and you are not up to fork and setup your own docker hub repo, feels free
1616
to open an issue for that.
1717

php-v8/Dockerfile

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
ARG V8=latest
22

3-
FROM pinepain/libv8:${V8}
3+
FROM libv8:${V8}
44

55
ARG PHP=7.2
6-
ARG PHP_REF=master
76
ARG PHP_V8=master
87

98
ENV DEBIAN_FRONTEND noninteractive
@@ -24,16 +23,8 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt
2423
php -i && \
2524
php-config || true
2625

27-
COPY ref.ini /etc/php/${PHP}/mods-available/ref.ini
28-
RUN git clone https://github.com/pinepain/php-ref.git && \
29-
cd php-ref && \
30-
git checkout ${PHP_REF} && \
31-
phpize && ./configure && make && make test && make install && \
32-
phpenmod ref && \
33-
cd .. && rm -rf php-ref
34-
3526
COPY v8.ini /etc/php/${PHP}/mods-available/v8.ini
36-
RUN git clone https://github.com/pinepain/php-v8.git && \
27+
RUN git clone https://github.com/phpv8/php-v8.git && \
3728
cd php-v8 && \
3829
git checkout ${PHP_V8} && \
3930
phpize && ./configure && make && make test && make install && \

php-v8/Makefile

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
V8 = 6.6.313
22
PHP = 7.2
3-
PHP_REF = v0.6.0
43
PHP_V8 = v0.2.2
54
DOCKER = docker
6-
NAME = pinepain/php-v8
5+
NAME = php-v8
76

87
all: build-all
98

@@ -16,19 +15,18 @@ stable: push-stable
1615
build-stable:
1716
$(DOCKER) build --build-arg PHP=$(PHP) \
1817
--build-arg V8=$(V8) \
19-
--build-arg PHP_REF=$(PHP_REF) \
2018
--build-arg PHP_V8=$(PHP_V8) \
2119
-t $(NAME):$(PHP_V8) .
2220

2321
build-latest:
2422
$(DOCKER) build --build-arg PHP=$(PHP) \
2523
-t $(NAME):latest .
2624

27-
push-stable: build-stable
28-
$(DOCKER) push $(NAME):$(PHP_V8)
25+
#push-stable: build-stable
26+
# $(DOCKER) push $(NAME):$(PHP_V8)
2927

30-
push-latest: build-latest
31-
$(DOCKER) push $(NAME):latest
28+
#push-latest: build-latest
29+
# $(DOCKER) push $(NAME):latest
3230

3331
clean: clean-latest clean-stable
3432

php-v8/ref.ini

-3
This file was deleted.

php-v8/test.php

-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php declare(strict_types=1);
22

3-
use Ref\WeakReference;
43
use V8\{
54
Isolate,
65
Context,
@@ -14,10 +13,6 @@
1413
echo 'Running script ...', PHP_EOL;
1514
echo (new Script($context, new StringValue($isolate, "'Hello, ' + 'world!'")))->run($context)->value(), PHP_EOL;
1615

17-
$weak_ref = new WeakReference($isolate, function () {
18-
echo 'Isolate destroyed', PHP_EOL;
19-
});
20-
2116
echo 'Destroying ...', PHP_EOL;
2217
$context = null;
2318
$isolate = null;

0 commit comments

Comments
 (0)