Giter VIP home page Giter VIP logo

Comments (6)

gpasqualetti avatar gpasqualetti commented on September 23, 2024 4

I managed to solve. The problem was the binding to localhost in the CMD command. The following Dockerfile works:

# Use a base image
FROM golang:1.16-alpine

ENV VERIFIER_SECRET_KEY='test'
EXPOSE 3005

# Set working directory
WORKDIR /app

# Install dependencies
# Musl-dev is required to fix stdlib.h
RUN apk update && apk add --no-cache wget git gcc musl-dev make sqlite 
RUN apk add --no-cache curl \     
  && curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-armv7.tar.gz | tar xzv \
  && mv migrate /usr/local/bin/migrate \     
  && apk del curl

# Pull source code
RUN git clone https://github.com/oxtyped/gpodder2go.git /app/gpodder2go

# Make
RUN cd /app/gpodder2go && make build

# Init
RUN cd gpodder2go && ./gpodder2go init

# Run
CMD ["sh", "-c", "echo $VERIFIER_SECRET_KEY && cd /app/gpodder2go && ./gpodder2go serve -b 0.0.0.0:3005"]

# Create a new user
RUN cd /app/gpodder2go && ./gpodder2go accounts create username --email="[email protected]" --name="MyName" --password="mypasswd"

With docker-compose:

version: '3.9'

services:
  gpodder2go:
    container_name: gpodder2go
    build:
      context: ./gpodder2go
      dockerfile: Dockerfile
    ports:       
      - "3005:3005"
    volumes:
      - ./gpodder2go/g2g.db:/app/gpodder2go/g2g.db

It might be necessary to create an empty g2g.db file the first time before mounting.

Maybe it could be worth sharing this info in the documentation.

from gpodder2go.

1Yanik3 avatar 1Yanik3 commented on September 23, 2024 4

In case anyone else is having this same issue, I created an automatically updating Docker image with everything setup and working. You can find it here: https://gitlab.com/ConfusedAnt/gpodder2go

from gpodder2go.

peterpepo avatar peterpepo commented on September 23, 2024 1

In case anyone else is having this same issue, I created an automatically updating Docker image with everything setup and working. You can find it here: https://gitlab.com/ConfusedAnt/gpodder2go

Can you build a raspberry pi image? At the moment it reports gpodder2go The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested when I try to run it on my rpi3b.

from gpodder2go.

oxtyped avatar oxtyped commented on September 23, 2024

Thanks for sharing this!

from gpodder2go.

hadleyrich avatar hadleyrich commented on September 23, 2024

Note for people using this that as mentioned above which I missed initially you may need to touch g2g.db before running lest docker creates the volume as a directory instead of a file.

from gpodder2go.

dgalli1 avatar dgalli1 commented on September 23, 2024

In case anyone else is having this same issue, I created an automatically updating Docker image with everything setup and working. You can find it here: https://gitlab.com/ConfusedAnt/gpodder2go

You might want to add into your README how you can set the env key and choose a different port.

    ports:
      - 8114:80
    environment:
      - VERIFIER_SECRET_KEY=ETiUYBjkR5qcu

Also, a hint about where the binary is would be helpful:

docker compose exec app /gpodder2go init
docker compose exec app /gpodder2go accounts

from gpodder2go.

Related Issues (20)

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.