Closed bashfulrobot closed 4 months ago
As a further test to rule out my nixos system, I quickly put together a docker container.
# Use the latest version of Ubuntu
FROM ubuntu:latest
# Update the system and install necessary packages
RUN apt-get update && apt-get install -y \
wget
# Download the latest version of comics-downloader
RUN wget https://github.com/Girbons/comics-downloader/releases/download/v0.33.8/comics-downloader
# Make the binary executable
RUN chmod +x comics-downloader
# Create the /app directory
RUN mkdir /app
RUN mkdir /app/mount
# Move the binary to the /app directory
RUN mv comics-downloader /app
# Set the working directory
WORKDIR /app
Then I run it with:
docker run -it -v "$(pwd):/app/mount" {{image}} /bin/bash
And get:
root@ec7044cfdaca:/app# ./comics-downloader --help
bash: ./comics-downloader: cannot execute binary file: Exec format error
And this dockerfile will work.
# First stage: Build the application
FROM golang:1.22 as builder
WORKDIR /src
# Install unzip and wget
RUN apt-get update && apt-get install -y \
wget \
unzip
# Download the source code
RUN wget https://github.com/Girbons/comics-downloader/archive/refs/tags/v0.33.8.zip
# Unzip the source code
RUN unzip v0.33.8.zip && rm v0.33.8.zip
# Move to the source code directory
WORKDIR /src/comics-downloader-0.33.8
# Build the application
RUN GOOS=linux go build -o /app/comics-downloader ./cmd/downloader
# Second stage: Create the final image
FROM ubuntu:latest
RUN mkdir /app && mkdir /app/mount
WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /app/comics-downloader /app
# Make the binary executable
RUN chmod +x /app/comics-downloader
Seems to be fixed in the alpha release.
Describe the bug A clear and concise description of what the bug is.
Seems like in the
0.33.8
release thecomics-downloader
binary may be in the wrong format. It seems to be arm vs amd.To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
I would expect the
file
command the reflect x64.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):