jobsync icon indicating copy to clipboard operation
jobsync copied to clipboard

Docker Images Do Not Exist

Open Anthony-Webb opened this issue 1 year ago • 9 comments

Preface

I am a novice when it comes to a lot of this. I don't often deal with podman/docker and this could very well be my fault, but I feel like I read it from top-to-bottom, left-to-right

  • Attempting to test this out on my local machine.
  • Fresh install of Podman and Podman-Compose.
  • Cloned the repo to my local machine in my users home dir
  • Edited the compose file to update with my secret, email, and password
  • cd into root of jobsync
  • run podman compose up
  • After a bit, receive the following error:
[3/4] STEP 9/9: RUN     if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then npm run build;     elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build;     else echo "Lockfile not found." && exit 1;     fi

> [email protected] build
> next build

  ▲ Next.js 14.2.3

   Creating an optimized production build ...
   Downloading swc package @next/swc-linux-x64-gnu...
   Downloading swc package @next/swc-linux-x64-musl...
 ✓ Compiled successfully
   Linting and checking validity of types ...
 ⨯ ESLint must be installed in order to run during builds: npm install --save-dev eslint
Failed to compile.

./jest.config.ts:6:29
Type error: Cannot find module 'jest' or its corresponding type declarations.

  4 |  */
  5 |
> 6 | import type { Config } from "jest";
    |                             ^
  7 | import nextJest from "next/jest.js";
  8 |
  9 | const createJestConfig = nextJest({
Error: building at STEP "RUN if [ -f yarn.lock ]; then yarn run build;     elif [ -f package-lock.json ]; then npm run build;     elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build;     else echo "Lockfile not found." && exit 1;     fi": while running runtime: exit status 1
ERROR:podman_compose:Build command failed
  • Am asked to select an image, but the image does not exist at any of the locations:
  ▸ registry.fedoraproject.org/jobsync_app_image:latest
    registry.access.redhat.com/jobsync_app_image:latest
    docker.io/library/jobsync_app_image:latest
  • If I select docker.io, I receive the following:
✔ docker.io/library/jobsync_app_image:latest
Trying to pull docker.io/library/jobsync_app_image:latest...
Error: initializing source docker://jobsync_app_image:latest: reading manifest latest in docker.io/library/jobsync_app_image: requested access to the resource is denied

System Information

Operating System: Fedora Linux 40 KDE Plasma Version: 6.2.1 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 Kernel Version: 6.11.3-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics Memory: 58.7 GiB of RAM Graphics Processor: AMD Radeon 780M Manufacturer: Framework Product Name: Laptop 16 (AMD Ryzen 7040 Series) System Version: AJ

Anthony-Webb avatar Oct 23 '24 19:10 Anthony-Webb

Hi There, Thanks for posting and sorry that you are having the issue. I don't understand if you are a novice then why do you use podmon instead of docker, I would suggest try not to modify the docker file at first and go with the defaults and use docker instead of podmon and let me know how it goes. By the way, there is no docker image published in the registry so it builds the docker image when you run the docker compose file from the repo folder, the app is still in beta and there are still some features of the app that require work, so bear with me until I publish the docker image.

Gsync avatar Oct 27 '24 20:10 Gsync

Hi @Anthony-Webb,

I got it working on my local operating system and build.

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631 
System Type:               x64-based PC

Already tried it in a Ubuntu-22.04.5-desktop-amd64 inside a Hyper-V Virtual Machine. Had the same problems as you. Here's how I fixed it.

  1. On Windows 11 I fired up an Administrator instance of WindowsPowerShell v1.0.
  2. Ran the following commands:
git clone https://github.com/Gsync/jobsync.git
docker compose up
  1. Navigate to http://localhost:3000/

  2. I was too lazy to setup environment variables for this as I'm new to the app. I just copied and pasted the default user name and password from the Dockerfile and was able to login ok. Haven't concerned myself with security while it's all secured behind my local firewall.

@Gsync I think some of those steps may need inclusion towards the top of the README. Willing to do a PR when asked, thanks for the hard work.

LayersOfAbstraction avatar Oct 31 '24 11:10 LayersOfAbstraction

@Gsync

I don't understand if you are a novice then why do you use podmon instead of docker,

It's just what I am most familiar with, even though that familiarization is minimal.

I would suggest try not to modify the docker file at first and go with the defaults and use docker instead of podmon and let me know how it goes.

I removed all traces of Podman, and installed docker per their documentation for my distro. After running git clone https://github.com/Gsync/jobsync.git, switching into that directory, then running docker compose up, I get the following:

$ docker compose up
[+] Running 1/0
 ✔ Container jobsync_app  Created                                                                                      0.0s 
Attaching to jobsync_app
jobsync_app  | Prisma schema loaded from prisma/schema.prisma
jobsync_app  | Datasource "db": SQLite database "dev.db" at "file:/data/dev.db"
jobsync_app  | 
jobsync_app  | Error: Schema engine error:
jobsync_app  | SQLite database error
jobsync_app  | unable to open database file: /data/dev.db
jobsync_app  | 
jobsync_app exited with code 1

By the way, there is no docker image published in the registry so it builds the docker image when you run the docker compose file from the repo folder, the app is still in beta and there are still some features of the app that require work, so bear with me until I publish the docker image.

Understood, I was reading the messages as it was coming through and Podman was asking me where I wanted to download the image from. Docker does not do that.

@LayersOfAbstraction

I don't have a Windows machine to try this on, but it seems you just ran through the documentation as I did. Not sure what I am doing wrong, if anything. This is a fresh installation of Docker and fresh clone of the repo. I did not change anything.

-- Anthony Webb

Anthony-Webb avatar Oct 31 '24 14:10 Anthony-Webb

@Gsync

I don't understand if you are a novice then why do you use podmon instead of docker,

It's just what I am most familiar with, even though that familiarization is minimal.

I would suggest try not to modify the docker file at first and go with the defaults and use docker instead of podmon and let me know how it goes.

I removed all traces of Podman, and installed docker per their documentation for my distro. After running git clone https://github.com/Gsync/jobsync.git, switching into that directory, then running docker compose up, I get the following:

$ docker compose up
[+] Running 1/0
 ✔ Container jobsync_app  Created                                                                                      0.0s 
Attaching to jobsync_app
jobsync_app  | Prisma schema loaded from prisma/schema.prisma
jobsync_app  | Datasource "db": SQLite database "dev.db" at "file:/data/dev.db"
jobsync_app  | 
jobsync_app  | Error: Schema engine error:
jobsync_app  | SQLite database error
jobsync_app  | unable to open database file: /data/dev.db
jobsync_app  | 
jobsync_app exited with code 1

By the way, there is no docker image published in the registry so it builds the docker image when you run the docker compose file from the repo folder, the app is still in beta and there are still some features of the app that require work, so bear with me until I publish the docker image.

Understood, I was reading the messages as it was coming through and Podman was asking me where I wanted to download the image from. Docker does not do that.

@LayersOfAbstraction

I don't have a Windows machine to try this on, but it seems you just ran through the documentation as I did. Not sure what I am doing wrong, if anything. This is a fresh installation of Docker and fresh clone of the repo. I did not change anything.

-- Anthony Webb

This is what I have on Windows 11 which works fine.

docker --version
Docker version 27.2.0, build 3ab4256

On Ubuntu-22.04.5-desktop-amd64 I have this docker version

docker --version
Docker version 27.3.1, build ce12230

I think it may be an issue with the Docker versions it's self and not the operating systems. My working version 27.2.0 is not available on Ubuntu when I check. Haven't checked if it exists on Fedora Linux 40.

LayersOfAbstraction avatar Oct 31 '24 21:10 LayersOfAbstraction

Are there any plans to have this hosted in a container registry?

I am no expert, but I think your instructions are not able to be used in a swarm config like I use. I think even if I could find a way to build them, I would still need a container registry to host the built image ....

I run scores of services and have built into it in the past couple of years, but this is the first project I have found that required building the image and did not have it built and hosted somewhere.

IGitYou avatar Jun 20 '25 12:06 IGitYou

Hi @Anthony-Webb,

I got it working on my local operating system and build.

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631 
System Type:               x64-based PC

Already tried it in a Ubuntu-22.04.5-desktop-amd64 inside a Hyper-V Virtual Machine. Had the same problems as you. Here's how I fixed it.

  1. On Windows 11 I fired up an Administrator instance of WindowsPowerShell v1.0.
  2. Ran the following commands:
git clone https://github.com/Gsync/jobsync.git
docker compose up
  1. Navigate to http://localhost:3000/
  2. I was too lazy to setup environment variables for this as I'm new to the app. I just copied and pasted the default user name and password from the Dockerfile and was able to login ok. Haven't concerned myself with security while it's all secured behind my local firewall.

@Gsync I think some of those steps may need inclusion towards the top of the README. Willing to do a PR when asked, thanks for the hard work.

So, just want to make sure I'm understanding. You're cloning the code into Windows 11, then the docker compose up creates a Docker container that's running in your WSL2 / Ubuntu instance? (Going to try that and see how it goes.)

@Gsync But yes, I have to agree that a bit more detail(s) on how to spin this up would probably not go amiss. ; )

ScottKFraley avatar Jul 21 '25 19:07 ScottKFraley

So, just want to make sure I'm understanding. You're cloning the code into Windows 11, then the docker compose up creates a Docker container that's running in your WSL2 / Ubuntu instance? (Going to try that and see how it goes.)

@Gsync But yes, I have to agree that a bit more detail(s) on how to spin this up would probably not go amiss. ; )

Hi @ScottKFraley,

Close but no. It worked on macOS Sequoia 15.5, M1 & Windows 11 filesystem in Docker with docker compose up without WSL2. Tried it in WSL2 as well but that didn't work.

Now I use Jobsync in Ubuntu 22.04 in Hyper-V as this bug in WSL2 was driving me nuts. sigh MS layed off to too many.

I'll just tell you how I fixed the Linux issue quickly as per pull request. It should work in WSL2 too of course.

Replace this line on your Dockerfile:

RUN addgroup --system --gid 1001 nodejs && \
    adduser --system --uid 1001 nextjs

With:

RUN addgroup --system --gid 1001 nodejs \
 && adduser --system --uid 1001 --ingroup nodejs nextjs

I hope it works! 🤞

LayersOfAbstraction avatar Jul 22 '25 00:07 LayersOfAbstraction

So, just want to make sure I'm understanding. You're cloning the code into Windows 11, then the docker compose up creates a Docker container that's running in your WSL2 / Ubuntu instance? (Going to try that and see how it goes.) @Gsync But yes, I have to agree that a bit more detail(s) on how to spin this up would probably not go amiss. ; )

Hi @ScottKFraley,

Close but no. It worked on macOS Sequoia 15.5, M1 & Windows 11 filesystem in Docker with docker compose up without WSL2. Tried it in WSL2 as well but that didn't work.

Just to be clear, I meant that, well, in my case I have docker desktop set up to keep its containers in my WSL2 instance, which, for me, has been working great by the way. Thanks for this info. though, for sure. I'm going to try to run it how I said, but if for whatever reason it doesn't work, I'm not sure what I'll have to do because I can't switch my Docker Desktop to use the Windows FS at this point due to all the other things I've already got running.

ScottKFraley avatar Jul 22 '25 16:07 ScottKFraley

Just to be clear, I meant that, well, in my case I have docker desktop set up to keep its containers in my WSL2 instance, which, for me, has been working great by the way. Thanks for this info. though, for sure. I'm going to try to run it how I said, but if for whatever reason it doesn't work, I'm not sure what I'll have to do because I can't switch my Docker Desktop to use the Windows FS at this point due to all the other things I've already got running.

Hey again, sorry for the misunderstanding. Yes I'm using WSL2 to run Docker containers. I think it would work that way even if you used Docker Desktop though you can use the Dev Containers extension in VS Code if you wanted to avoid WSL2 all together. No best practice here IMO.

LayersOfAbstraction avatar Jul 22 '25 21:07 LayersOfAbstraction