These are chat archives for azukiapp/azk

27th
Apr 2016
Vytenis
@FDiskas
Apr 27 2016 10:31
hi, what if port :53 already used? The agent could not be started
Vytenis
@FDiskas
Apr 27 2016 16:39
This message was deleted
This message was deleted
Vytenis
@FDiskas
Apr 27 2016 17:29

Azkfile.js

systems({
    FrontKit: {
        // Make sure that not root user is used
        docker_extra: {
            "User": "1000"
        },
        // Dependent systems
        depends: [],
        // More images:  http://images.azk.io
        image: {
            dockerfile: "./.docker"
        },
        // Steps to execute before running instances
        provision: [
            "npm install"
        ],
        workdir: "/azk/#{manifest.dir}",
        shell: "/bin/bash",
        command: ["./node_modules/.bin/gulp"],
        wait: 20,
        mounts: {
            '/azk/#{manifest.dir}': sync("."),
            '/azk/#{manifest.dir}/node_modules': persistent("./node_modules"),
        },
        scalable: {"default": 1},
        http: {
            domains: ["#{system.name}.#{azk.default_domain}"]
        },
        ports: {
            // exports global variables
            http: "3000/tcp"
        },
        envs: {
            // Make sure that the PORT value is the same as the one
            // in ports/http below, and that it's also the same
            // if you're setting it in a .env file
            NODE_ENV: "dev",
            PORT: "3000"
        }
    }
});

./.docker/Dockerfile

FROM node
RUN npm install -g gulp
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
RUN useradd -ms /bin/bash cli
RUN usermod -u 1000 cli
RUN mkdir -p /data
RUN chown 1000:1000 /data
RUN chown -R 1000:1000 /data
WORKDIR /data
CMD ["bash"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

./.docker/entrypoint.sh

#!/bin/bash

# Keep docker container alive
while true; do sleep 1000; done
And I got uknown error
azk: ✓ checking `azkbuild/763fda3e93-FrontKit:cb77571123c3f8d0370ba5a4a01c240af8321b7a` image...
azk: ⇲ building `azkbuild/763fda3e93-FrontKit:cb77571123c3f8d0370ba5a4a01c240af8321b7a` image...
azk: An error occurred. It will stop all instances already running. See details below.
nothing more
Docker file working if its runned with docker-compose up
Vytenis
@FDiskas
Apr 27 2016 17:41
azk logs shows nothing
Version   : azk version 0.18.0, build 8b9f66c, date 2016-04-06
OS        : Linux 4.4 (x64), Memory: 15772MB
Agent     : Running
Docker    : 1.11.0
Uses VM   : No
VirtualBox: N/A
Found some logs in home dir: hope it helps
2016-04-27T17:40:46.603Z - warn: [promise] Error: [sprintf] property 'error' does not exist
    at sprintf.format (/usr/lib/azk/node_modules/i18n-cli/node_modules/sprintf-js/src/sprintf.js:37:35)
    at sprintf (/usr/lib/azk/node_modules/i18n-cli/node_modules/sprintf-js/src/sprintf.js:21:31)
    at I18n._format (i18n-cli-0.0.3 - src/index.js:2:17)
    at I18n.translate (i18n-cli-0.0.3 - src/index.js:63:32)
    at I18n.t (i18n-cli-0.0.3 - src/index.js:35:28)
    at DockerBuildError.AzkError.toString (workspace-0.18.0 - src/utils/errors.js:1:14)
    at Object._status (workspace-0.18.0 - src/cli/ui.js:80:26)
    at Object.fail (workspace-0.18.0 - src/cli/ui.js:71:36)
    at AskSendErrorView.UIProxy.(anonymous function) [as fail] (workspace-0.18.0 - src/cli/ui.js:240:37)
    at GeneratorFunction._callee$ (workspace-0.18.0 - src/cli/error_handler.js:49:10)
    at tryCatch (/usr/lib/azk/node_modules/babel-polyfill/node_modules/babel-regenerator-runtime/runtime.js:61:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/azk/node_modules/babel-polyfill/node_modules/babel-regenerator-runtime/runtime.js:329:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/lib/azk/node_modules/babel-polyfill/node_modules/babel-regenerator-runtime/runtime.js:94:21)
    at GeneratorFunctionPrototype.tryCatcher (/usr/lib/azk/node_modules/bluebird/js/release/util.js:11:23)
    at PromiseSpawn._promiseFulfilled (/usr/lib/azk/node_modules/bluebird/js/release/generators.js:90:49)
    at GeneratorFunction.<anonymous> (/usr/lib/azk/node_modules/bluebird/js/release/generators.js:182:15)
Gullit Miranda
@gullitmiranda
Apr 27 2016 17:45
@FDiskas I believe that the error returned is empty, so this message in the log.
Vytenis
@FDiskas
Apr 27 2016 17:46
So the error is in the azk dependencies?
Gullit Miranda
@gullitmiranda
Apr 27 2016 17:46
have you ever tried to run by turning on the verbose mode (azk start -Bvvvv)? it may be that he is a most valuable information.
Vytenis
@FDiskas
Apr 27 2016 17:47
yes shure - but the same
Gullit Miranda
@gullitmiranda
Apr 27 2016 17:47
I believe that an error is not being passed when it should.
Vytenis
@FDiskas
Apr 27 2016 17:48
No mater what I do I got the same all the time http://i.imgur.com/xmCW0kG.png
Gullit Miranda
@gullitmiranda
Apr 27 2016 17:49
very strange this. is happening is some error in the build.
Vytenis
@FDiskas
Apr 27 2016 17:49
How to remove all builds?
Is it posible to you to try this docker with azk?
I need to verify which version of docker is being tested in the CI.
I can climb a machine with docker 1.11 and try to make some tests, only that later.
if you run adocker build -t image-name .docker, the build works?
Vytenis
@FDiskas
Apr 27 2016 17:59
yes Successfully built
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:02
I think I know what may be happening. try comment the docker_extra properti in Azkfile and make the build again
build using azk start -Bvv
Vytenis
@FDiskas
Apr 27 2016 18:07
the same
Its display error very quick
looks like nothing is done
I tryed
sudo rm -rf ~/.azk/data/persistent_folders
sudo rm -rf ~/.azk/data/sync_folders
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:10
yes, the error is not being displayed. you can open an issue with the information that you passed me? as soon as possible I will investigate this better.
while we do not solve this problem, you could do the build the external (adocker build and use the image instead of the Dockerfile?
Vytenis
@FDiskas
Apr 27 2016 18:12
hm shure I will try
thanks for help
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:12
wlc =D
Vytenis
@FDiskas
Apr 27 2016 18:16
how to title the issue
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:18
build using dockerfile in docker v1.11
I think that this is good
relate this conversation also
chat in gitter: [27 de Abril de 2016 14:29](https://gitter.im/azukiapp/azk?at=5720f7138a90ed791313353f)
about :53 port. solved?
Vytenis
@FDiskas
Apr 27 2016 18:21
Yes about port I just killed something that was using this
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:23
was dnsmasq?
Vytenis
@FDiskas
Apr 27 2016 18:24
docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p 172.17.0.1:53:53/udp --restart always tonistiigi/dnsdock -nameserver="172.18.1.252:53"
this was from other project
so there was running container
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:25
ow. great
Vytenis
@FDiskas
Apr 27 2016 18:29
https://github.com/CodersAKL/FrontKit
I was trying to make on this project as an alternative for dev environment
And was trying to avoid root permission problem
#100
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:33
what is the permission problem encountered in this case?
I am trying to run it on my machine =D
I think that this line can generate a problem in the execution with azk
https://github.com/CodersAKL/FrontKit/blob/master/server.js#L4
the permission issues that you referred to is about the generated files?
Vytenis
@FDiskas
Apr 27 2016 18:38
yes
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:39
another think. all entries .gitignore will be ignored by sync. I would recommend vc to add persistents for the folders that are in .gitignore. Otherwise all of the times that the application is closed the data will be lost.
Vytenis
@FDiskas
Apr 27 2016 18:40
hm
if I try to run already builded docker
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:43
I'm looking at the project here. this error must be happening for 2 reasons:
  1. .docker/entrypoint.sh no call gulp process
  2. PORT (the above mentioned)
i don't understand why you need the .docker/entrypoint.sh
Vytenis
@FDiskas
Apr 27 2016 18:44
to keep running the container
in normal case - when you run the container after run he stops - but I need to keep him running
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:45
for this is necessary if the gulp already does this?
Vytenis
@FDiskas
Apr 27 2016 18:45
true
I will try to change
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:49
if you are using entrypoint, you need to make it call the following process:
add this line in the end of file:
exec "$@"
Vytenis
@FDiskas
Apr 27 2016 18:57
I messed everything :D
Gullit Miranda
@gullitmiranda
Apr 27 2016 18:58
:wink:
you could do a PR adding this project to the gallery of the run project?
Vytenis
@FDiskas
Apr 27 2016 18:59
But its not running normaly :)
And sure I will if I got lucky
runned for me :D
Vytenis
@FDiskas
Apr 27 2016 19:02
And runs for me to but not with customized Dockerfile
Gullit Miranda
@gullitmiranda
Apr 27 2016 19:02
do the PR, before you agree let's take a reviewed and tested in the project, so that we can suggest or even submit improvements =D
ok. good =D
Vytenis
@FDiskas
Apr 27 2016 19:03
:D Thanks
Vytenis
@FDiskas
Apr 27 2016 19:10
I did't get how to make pull request. Do I need just open an issue?
Gullit Miranda
@gullitmiranda
Apr 27 2016 19:13
for now, yes. we will improve the submission process.
Vytenis
@FDiskas
Apr 27 2016 19:26
Installation takes to long :)