Skip to content

Instantly share code, notes, and snippets.

@magbicaleman
Last active November 14, 2016 07:38
Show Gist options
  • Save magbicaleman/83160d7ca04e92f854f6776246eefdc9 to your computer and use it in GitHub Desktop.
Save magbicaleman/83160d7ca04e92f854f6776246eefdc9 to your computer and use it in GitHub Desktop.
Docker container instructions on getting SOLEMARTYR d3stripes php script running

Install Docker

Instructions

  • Update your docker-compose.yml with the one below
  • Create a src folder in the same directory as your docker-compose.yml
  • Download a any php file into your src directory
  • Go to localhost:8080/your-php-file.php

Example

  • In your terminal run docker-compose up
  • In your src/ directory copy my index.php file contents and put them in a index.php file in your src/ directory
  • Should look like this src/index.php
  • Go to localhost:8080 in your browser; it might be blank if you don't have any other .php files in this directory

[Revision 4]

Changes

  • Update the docker-compose.yml to pull a new built image maybach/ds3:09.14.16.6
  • Mount your file system src/ file to the image
  • Update README.md

Image Details

version: '2'
services:
proxygen:
image: maybach/ds3:09.14.16.6
ports:
- '8080:8080'
volumes:
- ./src:/var/www
<?php
$output_dir_items = compose('gen_div', 'gen_anchor');
$current_dir = scandir('.');
$current_dir_remove_dots = array_filter($current_dir, function($item) {
return !preg_match('/^\.|index/', $item);
});
//
foreach($current_dir_remove_dots as $item) {
echo $output_dir_items($item);
}
//
function gen_anchor($file) {
return sprintf('<a href="/%s">%s</a>', $file, $file);
}
function gen_div($child) {
return sprintf('<div>%s</div>', $child);
}
function compose($f, $g) {
return function() use ($f, $g) {
return call_user_func($f, call_user_func_array($g, func_get_args()));
};
}
@SpookyBlack
Copy link

SpookyBlack commented Nov 14, 2016

When I use this for the d3stryr-3stripes.php, it says that the "Localhost is not in the list of supported domains for this site key.". This means that I am unable to Transfer the Google captcha token. Is this what's supposed to be happening or did I do something wrong?Will I still be able to cart successfully without this token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment