Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose: Repository does not exist or may require 'docker login' #416

Closed
cjeller1592 opened this issue Dec 9, 2020 · 8 comments · Fixed by #434
Closed

Docker Compose: Repository does not exist or may require 'docker login' #416

cjeller1592 opened this issue Dec 9, 2020 · 8 comments · Fixed by #434

Comments

@cjeller1592
Copy link
Contributor

Describe the bug

When I was trying to run WriteFreely via docker-compose based on @conor-f 's instructions, I ran into this.

$ sudo docker-compose run writefreely-web --config
Starting writefreely-db ... done
Pulling writefreely-web (writefreely:latest)...
ERROR: pull access denied for writefreely, repository does not exist or may require 'docker login'

The image in the docker-compose.yml file is this:

writefreely-web:
    container_name: "writefreely-web"
    image: "writefreely:latest"

When I try to perform a docker pull on this image, I get a similar error:

$ docker pull writefreely
Using default tag: latest
Error response from daemon: pull access denied for writefreely, repository does not exist or may require 'docker login'

I don't think this image actually exists. There is a writeas/writefreely image listed here. Should that the one that should be included instead?

Expected behavior

Docker pulls down the image successfully.

@conor-f
Copy link
Contributor

conor-f commented Dec 10, 2020

Hey @cjeller1592

Yeah, pretty sure the writeas/writefreely docker container should be here. I built it locally from the Dockerfile which is why I didn't spot the issue when I was merging. Went through all but configuring my reverse proxy and the last step of the instructions I laid out with the writeas/writefreely docker container and it worked good up to that point anyways.

If in doubt though, clone the repo and build from the Dockerfile. Can definitely confirm that works!

Conor

@cjeller1592
Copy link
Contributor Author

Thanks @conor-f! When I try to build the Dockerfile locally, I get this error:

make: *** No rule to make target 'build'.  Stop.
The command '/bin/sh -c make build  && make ui' returned a non-zero code: 2

Did you run into that issue at all? Not sure if it's because I am a Docker novice or because there's something wrong in the Dockerfile itself. Is there a flag I'm missing to modify the build command? I just ran docker build - < Dockerfile in the repo.

@conor-f
Copy link
Contributor

conor-f commented Dec 10, 2020

I am also quite new to docker, but I think the way I built it was

sudo docker build -t writefreely:dev .

@cjeller1592
Copy link
Contributor Author

cjeller1592 commented Dec 15, 2020

Gotcha — I swapped the writefreely:latest with writeas/writefreely and was able to go through the config process listed out in #407 . Now I am just having trouble connecting to the WriteFreely instance from my local machine. Looks like the WriteFreely logs show the instance running fine:

2020/12/15 16:40:16 Starting WriteFreely ...

2020/12/15 16:40:16 Loading config.ini configuration...

2020/12/15 16:40:16 Loading templates...

2020/12/15 16:40:17 Loading pages...

2020/12/15 16:40:17 Loading user pages...

2020/12/15 16:40:17 Loading encryption keys...

2020/12/15 16:40:17 Connecting to mysql database...

2020/12/15 16:40:17 Adding {domain} routes (single user)...

2020/12/15 16:40:17 Going to serve...

2020/12/15 16:40:17 Serving on http://localhost:8080

2020/12/15 16:40:17 ---

Just don't know if it's a port forwarding issue or what. Did you encounter anything similar @conor-f? I am using Docker Desktop for Mac if that helps.

@cjeller1592
Copy link
Contributor Author

Just wanted to bump this again and see if @conor-f or anyone that has run WriteFreely locally with Docker Compose has any tips on how to deal with what I've been encountering for a while. Every time I try to visit the instance in a browser, I get ERR_EMPTY_RESPONSE. This is after following the above referenced instructions in #407. Could it be an issue with the configuration? Here's my config.ini file:


[server]
hidden_host          =
port                 = 8080
bind                 =
tls_cert_path        =
tls_key_path         =
autocert             = false
templates_parent_dir =
static_parent_dir    =
pages_parent_dir     =
keys_parent_dir      =
hash_seed            =

[database]
type     = mysql
filename =
username = [redacted]
password = [redacted]
database = writefreely
host     = 172.19.0.2
port     = 3306

[app]
site_name          = cj
site_description   =
port     = 3306

[app]
site_name          = cj
site_description   =
host               = http://localhost
theme              =
editor             =
disable_js         = false
webfonts           = false
landing            =
simple_nav         = false
wf_modesty         = false
chorus             = false
forest             = false
disable_drafts     = false
single_user        = true
database = writefreely
host     = 172.19.0.2
port     = 3306

[app]
site_name          = cj
site_description   =
host               = http://localhost
theme              =
editor             =
disable_js         = false
webfonts           = false
landing            =
simple_nav         = false
wf_modesty         = false
chorus             = false
forest             = false
disable_drafts     = false
single_user        = true
open_registration  = false
min_username_len   = 0
max_blogs          = 0
federation         = false
public_stats       = false
private            = false
local_timeline     = false
user_invites       =
default_visibility =
update_checks      = false

Is there anything I am doing that's causing the port forwarding to not occur? Is there a particular config set up that works better with this containerized version of WriteFreely? Would be open to suggestions!

@conor-f
Copy link
Contributor

conor-f commented Dec 24, 2020

Hey so there's some things I don't quite get in your config.ini but I really don't have much knowledge about this...

First of all, under my [server] section, I have bind = 0.0.0.0 instead of empty.

The [database] section has an IP for the host, but writefreely-db (the name of the docker container for the MySQL host) is what I use.

You have three [app] sections which seems like a really bad idea but I have no idea. I think just the last one is necessary and it looks to match mine. The other two [app] sections look like they could be causing port conflicts as they specify running on port 3306 also as well as the DB?

@cjeller1592
Copy link
Contributor Author

cjeller1592 commented Feb 1, 2021

Thanks for the help @conor-f! I restarted the whole process, paid attention to your above points, and finally got WriteFreely running with instructions you laid out in your PR.

I ran it with the writeas/writefreely:latest image in the docker-compose file though. Will make a PR soon about this change — we all can discuss whether that's a good idea or not there.

Many thanks again for your assistance!

@conor-f
Copy link
Contributor

conor-f commented Feb 3, 2021

No problem CJ! Glad you got it sorted.

@thebaer thebaer linked a pull request May 10, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants