Runnerly / tokendealer

Microservice handling authentication tokens
Apache License 2.0
10 stars 1 forks source link

Working directory issue #1

Open dj0nes opened 6 years ago

dj0nes commented 6 years ago

Hi!

I'm following along with "Docker 101" in your excellent book, but the first build command doesn't seem to work as expected.

The commands I run are:

git clone git@github.com:Runnerly/tokendealer.git
cd tokendealer/docker
docker build -t runnerly/python .

The build will fail with the following message:

Step 6/17 : COPY docker/circus.ini /app/circus.ini
COPY failed: stat /var/lib/docker/tmp/docker-builder884936692/docker/circus.ini: no such file or directory

I can get those steps to work by removing 'docker' from the COPY commands, but will then get other file errors later in the script.

I'm on a Mac if that makes any difference.

tarekziade commented 6 years ago

Hello

You need to build the docker image from the root of the repository, not from the docker subdirectory.

Try like this:

$ docker build -t runnerly/python . --file docker/Dockerfile

You might also need to use --no-cache, as you might get the previous cached version.

akosourov commented 6 years ago

Hello! When I build image $ docker build -t runnerly/python . --file docker/Dockerfile I get a compile error on step 4/17:

cc -c -I/openresty-1.11.2.3/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -g -O2 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR -DNDK_SET_VAR -DNDK_SET_VAR -DLUA_DEFAULT_PATH='"/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua"' -DLUA_DEFAULT_CPATH='"/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so"' -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../ngx_lua-0.10.8/src/api -I objs \
    -o objs/src/event/ngx_event_openssl_stapling.o \
    src/event/ngx_event_openssl_stapling.c
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_connection_error’:
src/event/ngx_event_openssl.c:2048:21: error: ‘SSL_R_NO_CIPHERS_PASSED’ undeclared (first use in this function)
             || n == SSL_R_NO_CIPHERS_PASSED                          /*  182 */
                     ^~~~~~~~~~~~~~~~~~~~~~~
src/event/ngx_event_openssl.c:2048:21: note: each undeclared identifier is reported only once for each function it appears in
objs/Makefile:1090: recipe for target 'objs/src/event/ngx_event_openssl.o' failed
make[2]: *** [objs/src/event/ngx_event_openssl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/openresty-1.11.2.3/build/nginx-1.11.2'
Makefile:8: recipe for target 'build' failed
make[1]: Leaving directory '/openresty-1.11.2.3/build/nginx-1.11.2'
make[1]: *** [build] Error 2
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/sh -c curl -sSL https://openresty.org/download/openresty-1.11.2.3.tar.gz     | tar -xz &&     cd openresty-1.11.2.3 &&     ./configure -j2 &&     make -j2 &&     make install' returned a non-zero code: 2
tarekziade commented 6 years ago

Weird, what is your system and current docker version ?