arthurgarnier / turtl-docker Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] Docker file to install turtl (turtl.it) api
License: MIT License
[DEPRECATED] Docker file to install turtl (turtl.it) api
License: MIT License
Hello,
I followed this steps but only get a blank page with only ""Authentication failed." text on it.
sudo docker build -t turtl_docker . sudo docker run -d -p 8181:8181 -v $(pwd)/volume:/var/lib/rethinkdb/instance1 -t turtl_docker
I am missing something obvious? its installed on ubuntu 14.04
Thanks!
Rodo
Hi, I'm using docker on OSX and I can't get the container to start.
I run docker build -t turtl_docker .
successfully, output is Successfully built <id>
.
Then docker run -d -p 8181:8181 -v $(pwd)/volume:/var/lib/rethinkdb/instance1 -t turtl_docker
returns the image ID, but I don't think it actually runs the container.
I can't get the logs with docker logs turtl_docker
, as it just returns:
Error: No such container: turtl_docker
docker ps
gives me an empty list.
docker images
shows the image has been built though.
So I'm a bit confused and don't know how to debug this.
Note also, that I don't need sudo
on docker for OSX, so the commands are all executed without sudo
.
Any suggestions?
Thanks!
Hi there,
Got an issue trying to start a fresh docker image. The following comes up when attached to the console:
:: -> [steve@marslip] ~/docker/turtl-docker [git:master]
$ docker start turtl; docker attach turtl
turtl
To load turtl:
Load 1 ASDF system:
turtl
; Loading turtl
..................................................
.................................................
; Fetching #<URL http://beta.quicklisp.org/archive/yason/2016-02-08/yason-v0.7.6.tgz\>
; 25.96KB
....
..................................................
[package turtl-thread]
<INFO> [1467335180] turtl - Applying DB schema...
<INFO> [1467335187] turtl - Schema applied: (:TABLES-ADD (users boards notes personas boards_personas_link invites keychain sync log promo) :INDEXES (:PROMO (:ADD (:CODE)) :LOG (:ADD (:HASH)) :SYNC (:ADD (:REL :USER_SEARCH :SCAN_USER)) :KEYCHAIN (:ADD
(:ITEM_ID :USER_ID)) :INVITES (:ADD (:FROM :TO :OBJ_TO)) :BOARDS_PERSONAS_LINK (:ADD (:FROM :TO :BOARD_ID)) :PERSONAS (:ADD (:USER_ID :EMAIL)) :NOTES (:ADD (:USER_ID :BOARDS :BOARD_ID)) :BOARDS (:ADD (:PARENT_ID :USER_ID :ID)) :USERS (:ADD (:INVITE_CODE :A))))
<NOTICE> [1467335187] wookie - (start) Starting Wookie 0.0.0.0:NIL
<ERROR> [1467335187] turtl - Error initializing: The value NIL is not of the expected type (SIGNED-BYTE 32).
; Warning: an uv handle without corresponding object detected (:TCP)
; While executing: #<STANDARD-METHOD CL-ASYNC::HANDLE-CLEANUP ((EQL :ASYNC-SOCKET) T)>, in process listener(1).
Welcome to Clozure Common Lisp Version 1.11-r16635 (LinuxX8664)!
CCL is developed and maintained by Clozure Associates. For more information
about CCL visit http://ccl.clozure.com. To enquire about Clozure's Common Lisp
consulting services e-mail [email protected] or visit http://www.clozure.com.
? ^C
If I were to guess, I'd say that it's related to:
[1467335187] wookie - (start) Starting Wookie 0.0.0.0:NIL
[1467335187] turtl - Error initializing: The value NIL is not of the expected type (SIGNED-BYTE 32).
However, I cannot find a config file for this. Any idea where this would reside?
Hello. I upgraded my Turtl client to version 0.70 and updated my docker instance at the same time. I am no longer able to login to my server as I keep getting the following message:
Login failed -- Error: Authentication failed.
In addition, if I try to create a new account I get the following message:
There was a problem saving that account. /users timed out.
Looking at my logs, I have the following:
<DEBUG> [1542023788] turtl - turtl error: #<SOCKET-EOF #<TCP-SOCKET #x30200397AB1D>: 0: NIL #x3020039ABB8D>
<INFO> [1542023936] wookie - "POST /auth" 401 24
<ERROR> [1542023936] wookie - (hook) Error running hooks: PRE-ROUTE: (socket #<TCP-SOCKET #x3020039C418D>): Authentication failed.
<INFO> [1542023947] wookie - "POST /auth" 401 24
<ERROR> [1542023947] wookie - (hook) Error running hooks: PRE-ROUTE: (socket #<TCP-SOCKET #x302003A397AD>): Authentication failed.
<INFO> [1542023959] wookie - "POST /auth" 401 24
<ERROR> [1542023959] wookie - (hook) Error running hooks: PRE-ROUTE: (socket #<TCP-SOCKET #x302003A4192D>): Authentication failed.
<ERROR> [1542024002] turtl - check-auth: Query runtime error (NIL): Keys cannot be NULL.
---
#<REQL-CMD LIMIT/71 (#<REQL-CMD GET-ALL/78 (#<REQL-CMD TABLE/15 ("users") #x302003ADB4CD> :NULL) #x302003ADAB1D> 1) #x302003ADA23D>
<DEBUG> [1542024032] turtl - turtl error: #<SOCKET-EOF #<TCP-SOCKET #x302003A89E5D>: 0: NIL #x302003AFB18D>
Any ideas on what the issue could be here? Thanks for your help!
Hi,
tried to connect from my ubuntu 18.04 host to your docker container, but it isn't working. It is my first time using docker, hope its not something stupid. Tried following links in the desktop turtl application or in the browser to see same as on https://api.turl.it/v2/ or on https://api.framanotes.org/ but nothing shows up except of "couldn't connect to server".
http://0.0.0.0:8181/
http://0.0.0.0/
http://turtl.local:8181/
http://turtl.local/
http://172.17.0.2:8181/
http://172.17.0.2/
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9041ea8902ab turtl_docker "/bin/sh -c /opt/tur…" About an hour ago Up About an hour 0.0.0.0:8181->8181/tcp hardcore_mclean
$ nmap -Pn 0.0.0.0
Starting Nmap 7.60 ( https://nmap.org ) at 2018-08-17 21:05 CEST
PORT STATE SERVICE REASON VERSION
139/tcp open netbios-ssn syn-ack Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn syn-ack Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
631/tcp open ipp syn-ack CUPS 2.2
8181/tcp open tcpwrapped syn-ack
$ sudo docker exec -i -t 9041ea8902ab /bin/bash
root@754d59014d74:/opt/api# ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:02
inet addr:172.17.0.2 Bcast:172.17.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18279 errors:0 dropped:0 overruns:0 frame:0
TX packets:9460 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27177605 (27.1 MB) TX bytes:631788 (631.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@754d59014d74:/opt/api# nano /opt/turtl-setup
#!/bin/bash
default values
PIDFILE=${PIDFILE:-nil}
BINDADDR=${BINDADDR:-0.0.0.0}
BINDPORT=${BINDPORT:-8181}
PROD_ERR_HANDLING=${PROD_ERR_HANDLING:-t}
FQDN=${FQDN:-turtl.local}
SITE_URL=${SITE_URL:-http://turtl.local}
ADMIN_EMAIL=${ADMIN_EMAIL:[email protected]}
EMAIL_FROM=${EMAIL_FROM:[email protected]}
SMTP_USER=${SMTP_USER:-}
SMTP_PASS=${SMTP_PASS:-}
DISPLAY_ERRORS=${DISPLAY_ERRORS:-t}
DEFAULT_STORAGE_LIMIT=${DEFAULT_STORAGE_LIMIT:-100}
STORAGE_INVITE_CREDIT=${STORAGE_INVITE_CREDIT:-25}
LOCAL_UPLOAD_URL=${LOCAL_UPLOAD_URL:-http://turtl.local}
LOCAL_UPLOAD_PATH=${LOCAL_UPLOAD_PATH:-"/opt/api/uploads"}
AWS_S3_TOKEN=${AWS_S3_TOKEN:-(:token ''
Thought it is a basic connect from host to "server within docker" question, but haven't found anything helpful online.
Thank you very much!
Hello,
I had an issue while buliding the docker container and running it on Windows. because by default the text files checkout on Windows had CRLF lines ending. After we copy those files in the container they cannot be executed.
I see two solutions, either configure the repo to never checkout those files with CRLF, or by adding dos2unix to the container and fixing the crlf after the copy.
I have a preference with the second one because it will always work, and it will not depend on how the repo or the local git is configured.
Here is my Dockerfile, if you want to reuse it or suggest improvements.
`FROM ubuntu:16.04
ENV CCL_VERSION 1.11
ENV DEBIAN_FRONTEND noninteractive
ADD https://download.rethinkdb.com/apt/pubkey.gpg /tmp/rethinkdb-pubkey.gpg
RUN echo "deb http://download.rethinkdb.com/apt xenial main" | tee /etc/apt/sources.list.d/rethinkdb.list &&
apt-key add - < /tmp/rethinkdb-pubkey.gpg &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y wget libterm-readline-perl-perl gcc libuv1-dev git
rethinkdb dos2unix &&
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN wget -P /opt/ ftp://ftp.clozure.com/pub/release/${CCL_VERSION}/ccl-${CCL_VERSION}-linuxx86.tar.gz &&
mkdir -p /opt/ccl &&
tar xvzf /opt/ccl-${CCL_VERSION}-linuxx86.tar.gz -C /opt/ccl --strip-components=1
COPY quicklisp_install /quicklisp_install
RUN wget https://beta.quicklisp.org/quicklisp.lisp
RUN cat /quicklisp_install | /opt/ccl/lx86cl64 --load /quicklisp.lisp
RUN cd /opt/ &&
git clone https://github.com/turtl/api.git --depth 1
RUN cd /root/quicklisp/local-projects &&
git clone git://github.com/orthecreedence/cl-hash-util
RUN /opt/ccl/lx86cl64 -l /root/quicklisp/setup.lisp
COPY config.footer /opt/api/config/
COPY turtl-setup /opt/
COPY turtl-start /opt/
COPY launch.lisp /opt/api/
COPY rethinkdb.conf /etc/rethinkdb/instances.d/instance1.conf
RUN chmod a+x
/opt/turtl-setup
/opt/turtl-start
RUN dos2unix
/opt/turtl-setup
/opt/turtl-start
/opt/api/config/config.footer
/opt/api/launch.lisp
/etc/rethinkdb/instances.d/instance1.conf
EXPOSE 8181
WORKDIR /opt/api
VOLUME /var/lib/rethinkdb/instance1
CMD /opt/turtl-setup
#CMD /bin/bash
`
I have a server running Ubuntu - 17.10. I am trying to install webofmars/turtl-docker. I was able to pull the install. But when I try to run with the command that I have [sudo docker build -t turtl_docker .] I get a error: sudo docker build -t turtl_docker .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/eredwood/Dockerfile: no such file or directory
When trying to run the freshly installed container, I get this response when executing sudo docker run -d -p 8181:8181 -v $(pwd)/volume:/var/lib/rethinkdb/instance1 -t turtl_docker
:
7579ea6e73f8824fff703d09059eff72d95a87fb8ebfba3d190d470824ab7863
docker: Error response from daemon: failed to create endpoint furious_jones on network bridge: COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -A DOCKER -p tcp -d 0/0 --dport 8181 -j DNAT --to-destination 172.17.0.2:8181 ! -i docker0' failed:.
Docker version : 1.10.3
Commit 6a0ed0c
Hi,
I built the image on a Fedora 24 machine and when I start a container, trying to connect to localhost:8181 gives me "authentication failed".
Here's the log, below.
% docker logs big_goldstine
rethinkdb: instance1: The instance is not running (there is no pid file)
rethinkdb: instance1: Starting instance. (logging to `/var/lib/rethinkdb/instance1/data/log_file')
To load "turtl":
Load 1 ASDF system:
turtl
; Loading "turtl"
..................................................
[package cl-hash-util]............................
[package cl-rethinkdb-util].......................
[package cl-rethinkdb-reql].......................
[package cl-rethinkdb]............................
..................................................
[package turtl]...................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
.........
..................................................
[package turtl-thread]
<INFO> [1481897087] turtl - Applying DB schema...
<INFO> [1481897087] turtl - Schema applied: (:TABLES-ADD NIL :INDEXES NIL)
<NOTICE> [1481897087] wookie - (start) Starting Wookie 0.0.0.0:8181
<INFO> [1481897087] wookie - "GET /" 401 24
<ERROR> [1481897087] wookie - (hook) Error running hooks: PRE-ROUTE: (socket #<TCP-SOCKET #x302003072E8D>): Authentication failed.
<INFO> [1481897087] wookie - "GET NIL" 500 66
<DEBUG> [1481897087] turtl - turtl error: #<SOCKET-EOF #<TCP-SOCKET #x302003072E8D>: 0: NIL #x30200308CADD>
<INFO> [1481897088] wookie - "GET /favicon.ico" 401 24
<ERROR> [1481897088] wookie - (hook) Error running hooks: PRE-ROUTE: (socket #<TCP-SOCKET #x30200308BBCD>): Authentication failed.
Hi,
The container works well but by default anyone can register an account. Is it possible to disable this feature somehow? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.