Giter VIP home page Giter VIP logo

docker's People

Contributors

efepapa avatar gkristic avatar gkristic-vc avatar mend-for-github-com[bot] avatar phobologic avatar potocnyj avatar preetam avatar seaparks avatar

Stargazers

 avatar

Watchers

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

docker's Issues

write logs to stdout

Hi,

currently it appears the agent writes the logs into a file inside the container which makes them hard to access and inspect and eventually hard to debug when something is going wrong (i.e. connection issues). Imho writing to a file makes little sense in combination with -foreground. It is very typical for containers (i.e. in kubernetes) to simply log to stdout / stderr.

Via a bit of try and error I found the agent inside the container actually has a parameter -log-type and when setting this to -log-type=stderr it actually writes logs to stderr which is more or less what I need (although I would prefer if it writes to stdout).

So two requests:

  1. Please change the default dockerfile to already include -log-type=stderr or something equivalent.

  2. Is the -log-type parameter documented somewhere? What are the possible values it has (i.e. is there something like stdout instead)?

Thanks

Create no-frills Alpine-based image

Current image:

  • is much larger than it needs to be, ~200 megs,
  • manually downloads supervisor and uses non-standard paths,
  • it's hard to troubleshoot, does not perform any kind of self-test,
  • when container is stopped, agents are not given a chance to exit cleanly.

We should use our vanilla install script on top of a light-weight base to create an image customized for an API token (== customer environment). Then that image may be launched multiple times with different hostnames and RDS credentials.

Updated Alpine Support

The image used in the base default docker image is alpine 3.8 which is officially EOL.

I tried to PR a change to 3.12, and didn't have access. I am testing this version of alpine in a current environment. Feel free to reach out to me, and I can give you the details if you want to pull logs from this instance and agent to determine viability.

Build for alpine image fails

I ran this build command as described in alpine/README.md:

docker build --force-rm --build-arg VC_API_TOKEN=... -t vcimage https://raw.githubusercontent.com/VividCortex/docker/master/alpine/Dockerfile

And got the following output:

Downloading build context from remote url: https://raw.githubusercontent.com/VividCortex/docker/master/alpine/Dockerfile  1.629kB
Sending build context to Docker daemon  3.584kB
Step 1/7 : FROM alpine:3.4
 ---> c7fc7faf8c28
Step 2/7 : MAINTAINER VividCortex <[email protected]>
 ---> Using cache
 ---> edfa4b137b93
Step 3/7 : LABEL app=vividcortex
 ---> Using cache
 ---> eb68c49ff718
Step 4/7 : ARG VC_API_TOKEN
 ---> Using cache
 ---> f122332099e4
Step 5/7 : WORKDIR /
 ---> Using cache
 ---> 0bc0926e1461
Step 6/7 : ENTRYPOINT ["/usr/local/bin/vc-agent-007","-foreground","-forbid-restarts"]
 ---> Using cache
 ---> 51dbb759e094
Step 7/7 : RUN test -n "${VC_API_TOKEN}" &&     apk add --no-cache openssl &&     rm -f install &&     wget https://download.vividcortex.com/install &&     sh install --token=${VC_API_TOKEN} --batch --init=None --static --proxy=dyn --skip-certs &&     rm -f install &&     sed '1 a "log-max-size":"5",' /etc/vividcortex/global.conf > /etc/vividcortex/tempconf &&     sed '1 a "log-max-backups":"1",' /etc/vividcortex/tempconf > /etc/vividcortex/global.conf &&     rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf
 ---> Running in a31416056e05
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/1) Installing openssl (1.0.2n-r0)
Executing busybox-1.24.2-r14.trigger
OK: 5 MiB in 12 packages
Connecting to download.vividcortex.com (52.84.237.56:443)
wget: error getting response: Connection reset by peer
Removing intermediate container a31416056e05
The command '/bin/sh -c test -n "${VC_API_TOKEN}" &&     apk add --no-cache openssl &&     rm -f install &&     wget https://download.vividcortex.com/install &&     sh install --token=${VC_API_TOKEN} --batch --init=None --static --proxy=dyn --skip-certs &&     rm -f install &&     sed '1 a "log-max-size":"5",' /etc/vividcortex/global.conf > /etc/vividcortex/tempconf &&     sed '1 a "log-max-backups":"1",' /etc/vividcortex/tempconf > /etc/vividcortex/global.conf &&     rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf' returned a non-zero code: 1

I can run wget https://download.vividcortex.com/install just fine outside of the container so I'm assuming there's some SSL configuration incompatibility now. It also fails with a base image of 3.5, but it seems to work OK in 3.6. I haven't yet verified that the resulting image is usable.

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.