Giter Site home page Giter Site logo

rosineygp / mkdkr Goto Github PK

View Code? Open in Web Editor NEW
364.0 7.0 21.0 7.01 MB

mkdkr = Makefile + Docker

Home Page: https://rosineygp.github.io/mkdkr/

License: Apache License 2.0

Shell 96.12% Makefile 3.69% Dockerfile 0.11% JavaScript 0.07%
makefile docker pipelines bash travis-ci cirleci github-actions jenkins gitlab-ci

mkdkr's Introduction

mkdkr's People

Contributors

dependabot[bot] avatar neverbehave avatar rosineygp avatar thebouv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mkdkr's Issues

MacOS compatibility

Getting sed and random compatability issues:

sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
cat: /proc/sys/kernel/random/uuid: No such file or directory

Any plans to support MacOS?

An error occurs when cleaning up the docker container

I am getting an error during the cleanup process when using macOS v11.0.1.

Error:
cleanup: xargs: illegal option -- i usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]] [-J replstr] [-L number] [-n number [-x]] [-P maxprocs] [-s size] [utility [argument ...]] .../cicd/.tmp/job.log Error response from daemon: error while removing network: network network_job_f527265e-03f5-41d7-819a-1aded78ca67b id 6cc555c1ac34f35dd2b35ed72e45bfc2d28b9a7687fdf45f1f56c50bd7a0660c has active endpoints

Line 267 in the .mkdir is causing the problem...
...|xargs -i{} docker rm -f {} >&2

Note: it works if I change it to be ...| xargs docker rm -f >&2

Have alias function names for dot functions

I realise that .. and ... were chosen because "It creates a beautiful code style like yaml", but beauty is very subjective and dot functions are not exactly intuitive (outside of Brainfuck). Especially considering having .. enter into a container when in a shell it leaves/goes up a directory.
I would suggest having aliases e.g. .. could also be dkr_exec and ... could be dkr_start. These are just examples/suggestions and should probably be discussed a little more.

How do I set environment variables for my services?

Hi I'm working on a basic Elixir/Phoenix project and I need to use a postgresql database, for this I usually build a container like this (as a service):
docker run -p 5432: 5432 -d -e POSTGRES_PASSWORD=postgres - e POSTGRES_USER=postgres -e POSTGRES_DB=justdrawcats -v pgdata: /var/lib/postgresql/data postgres

but I wouldn't know how to do the same with mkdkr. Please, if you could guide me a bit, I would appreciate it, I have tried to do something like that but it doesn't work:

include $(shell [ ! -f .mkdkr ] && curl -fsSL https://git.io/JOBYz > .mkdkr; bash .mkdkr init)

server:
	@$(dkr)
	instance: elixir
	service: postgres
	#export POSTGRES_PASSWORD=postgres
	#export POSTGRES_USER=postgres
	#export POSTGRES_DB=test
	run: mix local.hex --force
	run: iex -S mix phx.server

cant define environment variables based on existing environment variables within container without leaking host environment variables into container

on host:

$ echo $HOME
# prints /home/airtonix

with mkdkr

include $(shell bash tools/mkdkr init)

example:
	@$(dkr)
	instance: ubuntu:20.04
	run: "export PATH=$PATH:/$HOME/something/i/just/installed"
	run: "echo $PATH"

outputs:

$ make -f ./test.mk example

Cannot stat file /proc/3142/fd/0: Permission denied
Cannot stat file /proc/3142/fd/1: Permission denied
Cannot stat file /proc/3142/fd/2: Permission denied
Cannot stat file /proc/3142/fd/3: Permission denied
Cannot stat file /proc/3142/fd/4: Permission denied
Cannot stat file /proc/3142/fd/5: Permission denied
Cannot stat file /proc/3142/fd/6: Permission denied
Cannot stat file /proc/3142/fd/7: Permission denied
Cannot stat file /proc/3142/fd/8: Permission denied
Cannot stat file /proc/3142/fd/9: Permission denied
Cannot stat file /proc/3142/fd/10: Permission denied
Cannot stat file /proc/3142/fd/11: Permission denied
Cannot stat file /proc/3142/fd/12: Permission denied
Cannot stat file /proc/3142/fd/13: Permission denied
Cannot stat file /proc/3142/fd/14: Permission denied
Cannot stat file /proc/3142/fd/15: Permission denied
Cannot stat file /proc/3142/fd/16: Permission denied
Cannot stat file /proc/3142/fd/17: Permission denied
Cannot stat file /proc/3142/fd/18: Permission denied
Cannot stat file /proc/3142/fd/19: Permission denied
Cannot stat file /proc/3142/fd/20: Permission denied
Cannot stat file /proc/3142/fd/21: Permission denied
Cannot stat file /proc/3142/fd/22: Permission denied
Cannot stat file /proc/3142/fd/23: Permission denied
Cannot stat file /proc/3142/fd/24: Permission denied
Cannot stat file /proc/3142/fd/25: Permission denied
Cannot stat file /proc/3142/fd/26: Permission denied
Cannot stat file /proc/3142/fd/27: Permission denied
Cannot stat file /proc/3142/fd/28: Permission denied
Cannot stat file /proc/3142/fd/29: Permission denied
Cannot stat file /proc/3142/fd/30: Permission denied
Cannot stat file /proc/3142/fd/31: Permission denied
Cannot stat file /proc/3142/fd/32: Permission denied
Cannot stat file /proc/3142/fd/33: Permission denied
Cannot stat file /proc/3142/fd/34: Permission denied
Cannot stat file /proc/3142/fd/35: Permission denied
Cannot stat file /proc/3142/fd/36: Permission denied
Cannot stat file /proc/3142/fd/37: Permission denied
Cannot stat file /proc/3142/fd/38: Permission denied
Cannot stat file /proc/3142/fd/39: Permission denied
Cannot stat file /proc/3142/fd/40: Permission denied
Cannot stat file /proc/3142/fd/41: Permission denied
Cannot stat file /proc/3142/fd/42: Permission denied
Cannot stat file /proc/3142/fd/43: Permission denied
Cannot stat file /proc/3142/fd/44: Permission denied
Cannot stat file /proc/3142/fd/45: Permission denied
Cannot stat file /proc/3142/fd/46: Permission denied
Cannot stat file /proc/3142/fd/47: Permission denied
Cannot stat file /proc/3142/fd/48: Permission denied
Cannot stat file /proc/3142/fd/49: Permission denied
Cannot stat file /proc/3142/fd/50: Permission denied
Cannot stat file /proc/3142/fd/51: Permission denied
Cannot stat file /proc/3142/fd/52: Permission denied
Cannot stat file /proc/3142/fd/53: Permission denied
Cannot stat file /proc/3142/fd/54: Permission denied
Cannot stat file /proc/3142/fd/55: Permission denied
Cannot stat file /proc/3142/fd/56: Permission denied
Cannot stat file /proc/3142/fd/57: Permission denied
Cannot stat file /proc/3142/fd/58: Permission denied
Cannot stat file /proc/3142/fd/59: Permission denied
Cannot stat file /proc/3142/fd/60: Permission denied
Cannot stat file /proc/3142/fd/61: Permission denied
Cannot stat file /proc/3142/fd/62: Permission denied
Cannot stat file /proc/3142/fd/63: Permission denied
Cannot stat file /proc/3142/fd/64: Permission denied
Cannot stat file /proc/3142/fd/65: Permission denied
Cannot stat file /proc/3142/fd/66: Permission denied
Cannot stat file /proc/3142/fd/67: Permission denied
Cannot stat file /proc/3142/fd/68: Permission denied
Cannot stat file /proc/3142/fd/69: Permission denied
Cannot stat file /proc/3142/fd/70: Permission denied
Cannot stat file /proc/3142/fd/71: Permission denied
Cannot stat file /proc/3142/fd/72: Permission denied
Cannot stat file /proc/3142/fd/73: Permission denied
Cannot stat file /proc/3142/fd/74: Permission denied
Cannot stat file /proc/3142/fd/75: Permission denied
Cannot stat file /proc/3142/fd/76: Permission denied
Cannot stat file /proc/3142/fd/77: Permission denied
Cannot stat file /proc/3142/fd/78: Permission denied
Cannot stat file /proc/3142/fd/79: Permission denied
Cannot stat file /proc/3142/fd/80: Permission denied
Cannot stat file /proc/3142/fd/81: Permission denied
Cannot stat file /proc/3142/fd/82: Permission denied
Cannot stat file /proc/3142/fd/83: Permission denied
Cannot stat file /proc/3142/fd/84: Permission denied
Cannot stat file /proc/3142/fd/85: Permission denied
Cannot stat file /proc/3142/fd/86: Permission denied
Cannot stat file /proc/3142/fd/87: Permission denied
Cannot stat file /proc/3142/fd/88: Permission denied
Cannot stat file /proc/3142/fd/89: Permission denied
Cannot stat file /proc/3142/fd/90: Permission denied
Cannot stat file /proc/3142/fd/91: Permission denied
Cannot stat file /proc/3142/fd/92: Permission denied
Cannot stat file /proc/3142/fd/102: Permission denied

start: example

network: network_example_0b574d52-4918-44d8-9c63-23e791d9ccf3
cd2e175f741ff459d8133d22cf468226c9209d2e4b93c2dc71d030fe21fdb0db

instance: ubuntu:20.04 
da09d686d516b7b71e4ec844cde504a7bf19ce922b747ab773202d2ba1c7421c

run: export PATH=ATH:/OME/something/i/just/installed

run: echo ATH
ATH

cleanup:
da09d686d516
removed '<redacted>/.tmp/example.log'
network_example_0b574d52-4918-44d8-9c63-23e791d9ccf3

completed:
0m0.006s 0m0.003s
0m0.286s 0m0.232s

so i try instead:

include $(shell bash tools/mkdkr init)

example:
	@$(dkr)
	instance: ubuntu:20.04
	run: "export PATH=$$PATH:/$$HOME/something/i/just/installed"
	run: "echo $$PATH"

outputs:

$ make -f ./test.mk example

Cannot stat file /proc/3142/fd/0: Permission denied
# clip millions of lines like this 
Cannot stat file /proc/3142/fd/102: Permission denied

start: example

network: network_example_60205d85-be1e-4832-a85a-9cdd17df29fa
ba6f9156a00981b949dd8cdf28d7a7fe13b0963d521723c525a95a1ce284b444

instance: ubuntu:20.04 
7bb29d75689f1ff96d689d9c69e435f135aaadbbd4714fa3dc03a94ab516c57b

run: export PATH=/home/airtonix/Applications/balena-cli:/home/airtonix/Applications:/home/airtonix/.local/bin:/home/airtonix/.rvm/gems/ruby-2.4.10/bin:/home/airtonix/.rvm/gems/ruby-2.4.10@global/bin:/home/airtonix/.rvm/rubies/ruby-2.4.10/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/airtonix/bin:/home/airtonix/bin:/home/airtonix/.rvm/bin:/home/airtonix/.volta/bin::/tools:/platform-tools:/home/airtonix/.rvm/bin://home/airtonix/something/i/just/installed

run: echo /home/airtonix/Applications/balena-cli:/home/airtonix/Applications:/home/airtonix/.local/bin:/home/airtonix/.rvm/gems/ruby-2.4.10/bin:/home/airtonix/.rvm/gems/ruby-2.4.10@global/bin:/home/airtonix/.rvm/rubies/ruby-2.4.10/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/airtonix/bin:/home/airtonix/bin:/home/airtonix/.rvm/bin:/home/airtonix/.volta/bin::/tools:/platform-tools:/home/airtonix/.rvm/bin
/home/airtonix/Applications/balena-cli:/home/airtonix/Applications:/home/airtonix/.local/bin:/home/airtonix/.rvm/gems/ruby-2.4.10/bin:/home/airtonix/.rvm/gems/ruby-2.4.10@global/bin:/home/airtonix/.rvm/rubies/ruby-2.4.10/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/airtonix/bin:/home/airtonix/bin:/home/airtonix/.rvm/bin:/home/airtonix/.volta/bin::/tools:/platform-tools:/home/airtonix/.rvm/bin

cleanup:
7bb29d75689f
removed '<redacted>/.tmp/example.log'
network_example_60205d85-be1e-4832-a85a-9cdd17df29fa

completed:
0m0.004s 0m0.006s
0m0.310s 0m0.206s

when env | grep PATH in the container actually reports:

$ make -f ./test.mk env

Cannot stat file /proc/3142/fd/102: Permission denied
# clip millions of lines like this 
Cannot stat file /proc/3142/fd/102: Permission denied

start: env

network: network_env_888f28e0-cd24-4698-bd2d-437f34afab73
98acb09c9516dc953173ae26d0d689174ad3226215b7da8333da5684a969a3a9

instance: ubuntu:20.04 
9db84fbff6fedcf09d596e31886422b54b9fb30523b9790323b3f58392c0214c

run: env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

cleanup:
9db84fbff6fe
removed '/home/zenobius/Projects/Work/Reckon/reckon-mobile/.tmp/env.log'
network_env_888f28e0-cd24-4698-bd2d-437f34afab73

completed:
0m0.005s 0m0.003s
0m0.267s 0m0.208s

Parallel build error in jenkins

+ make lint.ansible-lint
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
fatal: ambiguous argument 'origin/v1.0.0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
update: bitbucket_auto_review
repos: ssh://git@****.git
checkout: v1.0.0
file: main.mk
fatal: Unable to create '/home/ec2-user/jenkins/workspace/***-mkdkr/.tmp/includes/****/.git/shallow.lock': File exists.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.