Note: don't forget to create a Dockerfile in the same directory. Next command build new php-obfuscator image from current directory:
docker build -t php-obfuscator .How to verify? Next command should print info about new image:
| async function getJSON(response) { | |
| if (response.status === 204) return ''; | |
| return response.json(); | |
| } |
| const express = require('express') | |
| const cors = require('cors') | |
| const bodyParser = require("body-parser") | |
| const app = express() | |
| const PORT = process.env.port || 4000 | |
| // to parse req.body for POST-requests | |
| app.use(bodyParser.urlencoded({extended: true})); | |
| app.use(bodyParser.json()); |
| async function walk(dir) { | |
| let files = await fs.readdir(dir) | |
| files = await Promise.all(files.map(async file => { | |
| const filePath = path.join(dir, file) | |
| const stats = await fs.stat(filePath) | |
| if (stats.isDirectory()) { | |
| return walk(filePath); | |
| } | |
| else if (stats.isFile()) { | |
| return filePath; |
| const withImages = require("next-images"); | |
| const nextConfig = {...} | |
| module.exports = (phase) => { | |
| if (phase === PHASE_DEVELOPMENT_SERVER || phase === PHASE_PRODUCTION_BUILD) { | |
| const withCSS = require("@zeit/next-css"); | |
| return withCss(withImages(nextConfig))))); | |
| } | |
| return withImages(nextConfig); | |
| }; |
node <path-to-jest> -i <you-test-file> -c <jest-config> -t "<test-block-name>"