├── grunt-tasks ├── src │ ├── map.js │ ├── funcs.js │ ├── helpers.js │ ├── script.js │ ├── elements.js │ ├── maps.js │ └── main.js ├── Dockerfile ├── package.json ├── README.md └── Gruntfile.js ├── README.md └── .gitignore /grunt-tasks/src/map.js: -------------------------------------------------------------------------------- 1 | console.log('Map here'); 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Some of my Dockerfile(s) 2 | 3 | ## Grunt Tasks -------------------------------------------------------------------------------- /grunt-tasks/src/funcs.js: -------------------------------------------------------------------------------- 1 | function func1() { 2 | console.log('I am a function!'); 3 | } 4 | -------------------------------------------------------------------------------- /grunt-tasks/src/helpers.js: -------------------------------------------------------------------------------- 1 | function help() { 2 | console.log('I am here to help you!'); 3 | } 4 | -------------------------------------------------------------------------------- /grunt-tasks/src/script.js: -------------------------------------------------------------------------------- 1 | function help() { 2 | console.log('I am here to help you!'); 3 | } 4 | 5 | function func1() { 6 | console.log('I am a function!'); 7 | } 8 | -------------------------------------------------------------------------------- /grunt-tasks/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:6 2 | 3 | RUN mkdir -p /app 4 | 5 | WORKDIR /app 6 | 7 | # Install grunt as global before install as local 8 | RUN npm install -g grunt-cli 9 | 10 | -------------------------------------------------------------------------------- /grunt-tasks/src/elements.js: -------------------------------------------------------------------------------- 1 | console.log('elements here'); 2 | 3 | function show() { 4 | var variable = {}; 5 | 6 | variable['abacate'] = 21; 7 | variable['melao'] = 22; 8 | 9 | console.log(variable) 10 | } 11 | -------------------------------------------------------------------------------- /grunt-tasks/src/maps.js: -------------------------------------------------------------------------------- 1 | console.log('Map here'); 2 | 3 | 4 | console.log('elements here'); 5 | 6 | function show() { 7 | var variable = {}; 8 | 9 | variable['abacate'] = 21; 10 | variable['melao'] = 22; 11 | 12 | console.log(variable) 13 | } 14 | -------------------------------------------------------------------------------- /grunt-tasks/src/main.js: -------------------------------------------------------------------------------- 1 | console.log('Map here'); 2 | 3 | 4 | console.log('elements here'); 5 | 6 | function show() { 7 | var variable = {}; 8 | 9 | variable['abacate'] = 21; 10 | variable['melao'] = 22; 11 | 12 | console.log(variable) 13 | } 14 | 15 | function help() { 16 | console.log('I am here to help you!'); 17 | } 18 | 19 | function func1() { 20 | console.log('I am a function!'); 21 | } 22 | -------------------------------------------------------------------------------- /grunt-tasks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grunt-tasks", 3 | "description": "Docker image to run tasks with grunt", 4 | "author": "Fellipe Pinheiro", 5 | "bugs": { 6 | "url": "https://github.com/delete/mydockerfiles/issues" 7 | }, 8 | "dependencies": { 9 | "grunt": "^1.0.1", 10 | "grunt-cli": "^1.2.0", 11 | "grunt-contrib-concat": "^1.0.1", 12 | "grunt-contrib-uglify": "^0.11.1", 13 | "grunt-contrib-watch": "^0.6.1", 14 | "jit-grunt": "^0.10.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /grunt-tasks/README.md: -------------------------------------------------------------------------------- 1 | # Grunt Tasks 2 | 3 | ## Settings 4 | 5 | Change the files/directories that Grunt will be waching on Gruntfile. 6 | 7 | ## Creating image 8 | 9 | `docker build -t grunt-tasks .` 10 | 11 | Then 12 | 13 | ` docker run -it --name grunt -v $(pwd):/app grunt-tasks grunt dev ` 14 | 15 | ## (OR) Using my images and just run 16 | 17 | ` docker run -it --name grunt -v $(pwd):/app delete21/grunt-tasks:1 grunt dev ` 18 | 19 | 20 | [Docker hub link](https://hub.docker.com/r/delete21/grunt-tasks/) -------------------------------------------------------------------------------- /grunt-tasks/Gruntfile.js: -------------------------------------------------------------------------------- 1 | var grunt = require('grunt'); 2 | require('jit-grunt')(grunt); 3 | var fs = require('fs'); 4 | 5 | grunt.initConfig({ 6 | uglify: { 7 | my_target: { 8 | files: { 9 | 'dist/main.min.js': ['src/main.js'] 10 | } 11 | } 12 | }, 13 | 14 | watch: { 15 | dist: { 16 | files: ['src/*.js'], 17 | tasks: ['build'] 18 | } 19 | }, 20 | 21 | concat: { 22 | maps: { 23 | src: [ 24 | 'src/map.js', 25 | 'src/elements.js', 26 | ], 27 | dest: 'src/maps.js', 28 | }, 29 | script: { 30 | src: [ 31 | 'src/helpers.js', 32 | 'src/funcs.js', 33 | ], 34 | dest: 'src/script.js', 35 | }, 36 | main: { 37 | src: [ 38 | 'src/maps.js', 39 | 'src/script.js', 40 | ], 41 | dest: 'src/main.js', 42 | }, 43 | }, 44 | }); 45 | 46 | grunt.registerTask('default', ['concat', 'uglify', 'perm']); 47 | grunt.registerTask('build', ['concat', 'uglify', 'perm']); 48 | grunt.registerTask('dev', ['watch', 'perm']); 49 | 50 | grunt.registerTask('perm', 'Give the right permission', function() { 51 | fs.chown('src/maps.js', 1000, 1000); 52 | fs.chown('dist/main.min.js', 1000, 1000); 53 | }); 54 | 55 | module.exports = grunt; 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/python,node 3 | 4 | ### Python ### 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *$py.class 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .Python 15 | env/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | downloads/ 20 | eggs/ 21 | .eggs/ 22 | lib/ 23 | lib64/ 24 | parts/ 25 | sdist/ 26 | var/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *,cover 50 | .hypothesis/ 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | local_settings.py 59 | 60 | # Flask stuff: 61 | instance/ 62 | .webassets-cache 63 | 64 | # Scrapy stuff: 65 | .scrapy 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # IPython Notebook 74 | .ipynb_checkpoints 75 | 76 | # pyenv 77 | .python-version 78 | 79 | # celery beat schedule file 80 | celerybeat-schedule 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv/ 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | 93 | # Rope project settings 94 | .ropeproject 95 | 96 | 97 | ### Node ### 98 | # Logs 99 | logs 100 | *.log 101 | npm-debug.log* 102 | 103 | # Runtime data 104 | pids 105 | *.pid 106 | *.seed 107 | *.pid.lock 108 | 109 | # Directory for instrumented libs generated by jscoverage/JSCover 110 | lib-cov 111 | 112 | # Coverage directory used by tools like istanbul 113 | coverage 114 | 115 | # nyc test coverage 116 | .nyc_output 117 | 118 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 119 | .grunt 120 | 121 | # node-waf configuration 122 | .lock-wscript 123 | 124 | # Compiled binary addons (http://nodejs.org/api/addons.html) 125 | build/Release 126 | 127 | # Dependency directories 128 | node_modules 129 | jspm_packages 130 | 131 | # Optional npm cache directory 132 | .npm 133 | 134 | # Optional eslint cache 135 | .eslintcache 136 | 137 | # Optional REPL history 138 | .node_repl_history --------------------------------------------------------------------------------