Giter VIP home page Giter VIP logo

entrykit's Introduction

Hello, I'm Jeff! 馃憢

I'm a creator and entrepreneur known for my work and ideas in open source developer tooling.

I try to push the boundaries of computing as a magical tool and compiler for the imagination.

Since you found me on GitHub, you can join my Discord.

entrykit's People

Contributors

hoel-zr-o avatar joemcmahon avatar progrium avatar ssoriche 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

entrykit's Issues

Documentation

These tools look like they could be very useful. Some documentation to help explain them, what they do, and maybe an example use case would be awesome.

releases and Dockerfile

Would it be possible that the releases are binaries instead of tgz ?
This would allow us to do this in Dockerfiles:
ADD https://github.com/progrium/entrykit/releases/download/v0.4.0/entrykit_0.4.0_Linux_x86_64 /bin/entrykit

`prehook` cannot find executable

[Originally posted by @Brescia717]
Any chance you've tried using prehook? Running this in the Dockerfile:

ENTRYPOINT [ \
  "prehook", "ruby -v", "--", \
  "prehook", "/myapp/backend/prehook", "--"]

yields this error:

Error response from daemon: failed to create shim task: 
OCI runtime create failed: runc create failed: 
unable to start container process: 
exec: "prehook": executable file not found in $PATH: unknown

NOTE: /myapp/backend is the directory the application is in, in the docker container.

Trouble quoting arguments to codep commands

With a command like codep <script with flags> <other script> I could not figure out how to get things to behave correctly when the flags required quoting.

For instance, with codep "consul-template -template '/etc/nginx/conf.d/services.conf.ctmpl:/etc/nginx/conf.d/services.conf:nginx -s reload'" I could not for the life of me figure out the quoting that would work correctly. Part of the issue might be that the ENTRYPOINT from Dockerfile makes this even more complicated, but I haven't tried codep directly yet.

I ended up just using an HCL file so I wouldn't need to quote the spaces around "nginx -s reload".

Race condition near `t.Process.Signal(sig)`?

Sometimes running these commands panics a Go program, sometimes it doesn't seem to do anything:

$ sudo docker run -it progrium/envy sh
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x451d12]

goroutine 9 [running]:
os.(*Process).signal(0x0, 0x7f206b2c77a8, 0xc2080325a8, 0x0, 0x0)
        /usr/local/go/src/os/exec_unix.go:40 +0x42
os.(*Process).Signal(0x0, 0x7f206b2c77a8, 0xc2080325a8, 0x0, 0x0)
        /usr/local/go/src/os/doc.go:51 +0x4e
github.com/progrium/entrykit.func路001()
        /home/ubuntu/.go_workspace/src/github.com/progrium/entrykit/entrykit.go:51 +0xf8
created by github.com/progrium/entrykit.ProxySignals
        /home/ubuntu/.go_workspace/src/github.com/progrium/entrykit/entrykit.go:54 +0x12e

...

Same thing with /bin/bash:

$ sudo docker run -it progrium/envy /bin/bash
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x451d12]

goroutine 9 [running]:
os.(*Process).signal(0x0, 0x7fe1542ca7a8, 0xc2080325e8, 0x0, 0x0)
        /usr/local/go/src/os/exec_unix.go:40 +0x42
os.(*Process).Signal(0x0, 0x7fe1542ca7a8, 0xc2080325e8, 0x0, 0x0)
        /usr/local/go/src/os/doc.go:51 +0x4e
github.com/progrium/entrykit.func路001()
        /home/ubuntu/.go_workspace/src/github.com/progrium/entrykit/entrykit.go:51 +0xf8
created by github.com/progrium/entrykit.ProxySignals
        /home/ubuntu/.go_workspace/src/github.com/progrium/entrykit/entrykit.go:54 +0x12e

...

Don't render if file exists

Idea...render should only render the template if the desired file does not exist. For example, say the end user of a Docker image wants to provide a config file through a volume mount and not care about rendering a template at all.

codep argument parsing

I do this:

ENTRYPOINT [ \
  "codep", \
    "/usr/sbin/ucarp --interface=eth0", \
    "/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg" ]

And get this:

!! exec: "eth0": executable file not found in $PATH

I don't really understand what's happening, I think codep parses argv[1] wrongly.

render only last file having same base filename

If render files having same base filename like test.01.txt test.02.txt, only last file are rendered.

My Dockerfile is like below.

FROM ubuntu:latest
ENV ENTRYKIT_VERSION   0.4.0
ADD https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz /tmp/entrykit.tgz
RUN tar -xf /tmp/entrykit.tgz -C /bin entrykit && \
    entrykit --symlink && \
    true
COPY test.01.txt.tmpl /tmp/
COPY test.02.txt.tmpl /tmp/
ENTRYPOINT [ \
    "render", \
        "/tmp/test.01.txt", \
        "/tmp/test.02.txt", \
    "--", \
    "codep", \
        "tail -f /dev/null" \
]

I run this image and exec ls /tmp/. Only test.02.txt exist.

entrykit.tgz  test.01.txt.tmpl  test.02.txt  test.02.txt.tmpl

But if divide render task into two like below, both files are renderd.

ENTRYPOINT [ \
    "render", \
        "/tmp/test.01.txt", \
    "--", \
    "render", \
        "/tmp/test.02.txt", \
    "--", \
    "codep", \
        "tail -f /dev/null" \
]

Support on Mac M1

Hi, do you have any plan on supporting the Macbook M1? I'm getting this error on my machine:

image

Here's how we used entrykit in our Docker


RUN wget https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
  && tar -xvzf entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
  && rm entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
  && mv entrykit /bin/entrykit \
  && chmod +x /bin/entrykit \
  && entrykit --symlink

Thank you!

alpine package

Entrykit works great with Alpine and it's a bit cumbersome to set up Entrykit. curl .. | tar .. and then entrykit --symlink. If made an Alpine package it could be as simple as apk-install entrykit.

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.