docs icon indicating copy to clipboard operation
docs copied to clipboard

Docker install instructions?

Open dessalines opened this issue 5 years ago • 16 comments

Neither prod nor dev docker install instructions are on the docs website, or here.

dessalines avatar Aug 31 '19 17:08 dessalines

Also with the default docker-compose file, after adding a .env, I get the error:

Building app
ERROR: Cannot locate specified Dockerfile: Dockerfile

dessalines avatar Aug 31 '19 17:08 dessalines

You might need to add something like:

    build: 
      context: contrib
      dockerfile: contrib/Dockerfile

dessalines avatar Aug 31 '19 17:08 dessalines

@dessalines The dockerfile was contributed by someone, I have not tested it yet.

dansup avatar Sep 01 '19 18:09 dansup

I got it to build from scratch in docker by adding lines similar to those above, and it loaded the main pixelfed page, but gave a message about site errors.

dessalines avatar Sep 01 '19 19:09 dessalines

There are a few people (including myself) who fixed the docker a while ago... but I'm waiting for a stable before I start investigating again

shleeable avatar Sep 04 '19 08:09 shleeable

Changing docker-compose.yml like this and running docker-compose up, I'm able to access a botched landing page saying "Something went wrong" twice [fig. 1]. If I click "Register" (or anything that redirects me to the HTTPS version of the site), I'm greeted by an error code saying SSL_ERROR_RX_RECORD_TOO_LONG [fig. 2]). This is as far as I've been able to get with my very limited knowledge of Docker, system administrations, and all that jazz. I think maybe what I need to do is generate SSL certificates and put them somewhere, but I'm too tired to spend any more time trying to do that now. If anyone else knows what to do, please fill us in :blush:

Fig. 1: pixelfed-8080

Fig. 2: pixelfed-https

ahstro avatar Oct 01 '19 21:10 ahstro

@ahstro i had the same error like in [fig. 1]. My fault was, that the APP_KEY variable in .env file was not set to 32 char random string. I had 33 chars. :man_facepalming:

Strubbl avatar Nov 01 '19 17:11 Strubbl

$ docker-compose up 
Building app
ERROR: Cannot locate specified Dockerfile: Dockerfile

:sob:

fix:

      context: contrib/docker 
      dockerfile: ./Dockerfile.fpm

:cupid:

albjeremias avatar Jan 20 '20 17:01 albjeremias

When i open the registration.. in debug i get this message:

(1/1)                                     InvalidArgumentException                                                                  Action Facade\Ignition\Http\Controllers\ExecuteSolutionController not defined.
--
in UrlGenerator.php line 453
at UrlGenerator->action('Facade\\Ignition\\Http\\Controllers\\ExecuteSolutionController', array(), true)in helpers.php line 103
at action('\\Facade\\Ignition\\Http\\Controllers\\ExecuteSolutionController')in SolutionTransformer.php line 32
at SolutionTransformer->toArray()in ErrorPageViewModel.php line 106
at ErrorPageViewModel->solutions()in ErrorPageViewModel.php line 177
at ErrorPageViewModel->toArray()in ErrorPageHandler.php line 73
at ErrorPageHandler->renderException(object(ErrorPageViewModel))in ErrorPageHandler.php line 52
at ErrorPageHandler->handle(object(QueryException))in IgnitionWhoopsHandler.php line 25
at IgnitionWhoopsHandler->handle(object(QueryException))in Run.php line 321
at Run->handleException(object(QueryException))in Handler.php line 360
at Handler->renderExceptionWithWhoops(object(QueryException))in Handler.php line 339
at Handler->renderExceptionContent(object(QueryException))in Handler.php line 323
at Handler->convertExceptionToResponse(object(QueryException))in Handler.php line 302
at Handler->prepareResponse(object(Request), object(QueryException))in Handler.php line 207
at Handler->render(object(Request), object(QueryException))in Handler.php line 51
at Handler->render(object(Request), object(QueryException))in Pipeline.php line 51
at Pipeline->handleException(object(Request), object(QueryException))in Pipeline.php line 132
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in RedirectIfAuthenticated.php line 25
at RedirectIfAuthenticated->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Localization.php line 21
at Localization->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in TwoFactorAuth.php line 33
at TwoFactorAuth->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in EmailVerificationCheck.php line 33
at EmailVerificationCheck->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in VerifyCsrfToken.php line 76
at VerifyCsrfToken->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in StartSession.php line 56
at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in FrameGuard.php line 18
at FrameGuard->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 105
at Pipeline->then(object(Closure))in Router.php line 683
at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 658
at Router->runRoute(object(Request), object(Route))in Router.php line 624
at Router->dispatchToRoute(object(Request))in Router.php line 613
at Router->dispatch(object(Request))in Kernel.php line 177
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in InjectDebugbar.php line 58
at InjectDebugbar->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in TrustProxies.php line 57
at TrustProxies->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in TransformsRequest.php line 21
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in TransformsRequest.php line 21
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in CheckForMaintenanceMode.php line 62
at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in HandlePreflight.php line 29
at HandlePreflight->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 105
at Pipeline->then(object(Closure))in Kernel.php line 152
at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 117
at Kernel->handle(object(Request))in index.php line 53

& https://github.com/pixelfed/pixelfed/pull/1949

albjeremias avatar Jan 20 '20 18:01 albjeremias

After some struggling, I finally made the contributed Docker-Images run.

Using the fpm Dockerfile, a resulting image file using 1.39 GiB memory is used. From my point of view, this can be optimizied, since layers can be combined etc.

For official images, like proposed in #19 , this would be far to much.

If you like to, I could give it a try within the next weeks.

carstencodes avatar Jun 10 '20 21:06 carstencodes

@carstencodes I'd be very interested in official docker images and instructions on deploying using these images.

tomash avatar Jul 15 '20 15:07 tomash

As for now when I try to docker-compose up, it fails on the main dockerfile around line 61:

Step 15/37 : RUN docker-php-ext-install "-j$(nproc) gd"
 ---> Running in 9366e3e64580
usage: /usr/local/bin/docker-php-ext-install [-jN] [--ini-name file.ini] ext-name [ext-name ...]
   ie: /usr/local/bin/docker-php-ext-install gd mysqli
       /usr/local/bin/docker-php-ext-install pdo pdo_mysql
       /usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop

if custom ./configure arguments are necessary, see docker-php-ext-configure

Possible values for ext-name:
bcmath bz2 calendar ctype curl dba dom enchant exif ffi fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zend_test zip

Some of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.
ERROR: Service 'worker' failed to build: The command '/bin/sh -c docker-php-ext-install "-j$(nproc) gd"' returned a non-zero code: 1

tomash avatar Jul 15 '20 16:07 tomash

Are there any updates on a (semi-)official docker image?

OnSive avatar May 11 '21 19:05 OnSive

Looking at the instructions and steps and required services really there needs to be an official docker image for this.

runxc1 avatar Dec 23 '21 19:12 runxc1

Looking at the instructions and steps and required services really there needs to be an official docker image for this.

Preferably a recommended docker-compose.yml as well.

edm00se avatar Dec 23 '21 19:12 edm00se

Opening this back up for anyone who finds this from Google. The docker images are booting now, and with a few other manual steps (the "one-time setup tasks"), Pixelfed is mostly coming up now.

Here is the PR: https://github.com/pixelfed/pixelfed/pull/3850)

(Oddly enough, I'm still getting the "SSL_ERROR_RX_RECORD_TOO_LONG" error when trying to register, which is how I ended up here!)

M-D-M avatar Dec 04 '22 03:12 M-D-M