Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UPDATE on my tailwind/jit/webpack5/docker adventures:
I used these docker image deps instead:
`webpack docker build`:
```
FROM node:14.15.5-alpine3.13 AS webpack
LABEL maintainer="Nick Janetakis <nick.janetakis@gmail.com>"
WORKDIR /app/assets
RUN apk add --update git build-base nodejs-current nodejs-npm yarn \
&& mkdir -p /node_modules && chown node:node -R /node_modules /app
USER node
...
```
`dev docker build`:
```
FROM elixir:1.12.1-alpine AS dev
LABEL maintainer="Nick Janetakis <nick.janetakis@gmail.com>"
WORKDIR /app
RUN apk add --update git build-base nodejs-current nodejs-npm yarn curl inotify-tools \
&& addgroup -S elixir && adduser -S elixir -G elixir \
&& mkdir -p /node_modules && chown elixir:elixir -R /node_modules /app
USER elixir
...
```
`prod docker build`:
```
FROM elixir:1.12.1-alpine AS prod
LABEL maintainer="Nick Janetakis <nick.janetakis@gmail.com>"
WORKDIR /app
RUN apk add --update git build-base nodejs-current nodejs-npm yarn curl bash openssl postgresql-client \
&& addgroup -S elixir && adduser -S elixir -G elixir \
&& mkdir -p /node_modules && chown elixir:elixir -R /node_modules /app \
&& chown elixir:elixir -R /app
USER elixir
...
```
And it built! BUT I still get that weird bcrypt runtime crash.
What is odd is that with my "old" `Dockerfile` I never get that runtime crash. Not sure what is going on.
crash:
```
faithful_word | =ERROR REPORT==== 22-Jun-2021::01:13:12.491557 ===
faithful_word | Error in process <0.3697.0> with exit value:
faithful_word | {#{'__exception__' => true,'__struct__' => 'Elixir.RuntimeError',
faithful_word | message =>
faithful_word | <<"An error occurred when loading Bcrypt.\nMake sure you have a C compiler and Erlang 20 installed.\nIf you are not using Erlang 20, either upgrade to Erlang 20 or\nuse version 0.12 of bcrypt_elixir.\nSee the Comeonin wiki for more information.\n">>},
faithful_word | [{'Elixir.Bcrypt.Base',init,0,[{file,"lib/bcrypt/base.ex"},{line,17}]},
faithful_word | {init,'-run_on_load_handlers/2-fun-0-',1,[]}]}
faithful_word |
faithful_word | =SUPERVISOR REPORT==== 22-Jun-2021::01:13:12.492468 ===
faithful_word | supervisor: {local,kernel_sup}
faithful_word | errorContext: start_error
faithful_word | reason: {on_load_function_failed,'Elixir.Bcrypt.Base'}
faithful_word | offender: [{pid,undefined},
faithful_word | {id,kernel_safe_sup},
faithful_word | {mfargs,{supervisor,start_link,
faithful_word | [{local,kernel_safe_sup},kernel,safe]}},
faithful_word | {restart_type,permanent},
faithful_word | {significant,false},
faithful_word | {shutdown,infinity},
faithful_word | {child_type,supervisor}]
faithful_word |
faithful_word | =CRASH REPORT==== 22-Jun-2021::01:13:12.492625 ===
faithful_word | crasher:
faithful_word | initial call: supervisor:kernel/1
faithful_word | pid: <0.3695.0>
faithful_word | registered_name: []
faithful_word | exception exit: {on_load_function_failed,'Elixir.Bcrypt.Base'}
faithful_word | in function init:run_on_load_handlers/0
faithful_word | in call from kernel:init/1 (kernel.erl, line 189)
faithful_word | in call from supervisor:init/1 (supervisor.erl, line 330)
faithful_word | in call from gen_server:init_it/2 (gen_server.erl, line 423)
faithful_word | in call from gen_server:init_it/6 (gen_server.erl, line 390)
faithful_word | ancestors: [kernel_sup,<0.3681.0>]
faithful_word | message_queue_len: 0
faithful_word | messages: []
faithful_word | links: [<0.3683.0>]
faithful_word | dictionary: []
faithful_word | trap_exit: true
faithful_word | status: running
faithful_word | heap_size: 376
faithful_word | stack_size: 28
faithful_word | reductions: 227
faithful_word | neighbours:
faithful_word |
faithful_word | =CRASH REPORT==== 22-Jun-2021::01:13:13.501331 ===
faithful_word | crasher:
faithful_word | initial call: application_master:init/4
faithful_word | pid: <0.3680.0>
faithful_word | registered_name: []
faithful_word | exception exit: {{shutdown,
faithful_word | {failed_to_start_child,kernel_safe_sup,
faithful_word | {on_load_function_failed,'Elixir.Bcrypt.Base'}}},
faithful_word | {kernel,start,[normal,[]]}}
faithful_word | in function application_master:init/4 (application_master.erl, line 142)
faithful_word | ancestors: [<0.3679.0>]
faithful_word | message_queue_len: 1
faithful_word | messages: [{'EXIT',<0.3681.0>,normal}]
faithful_word | links: [<0.3679.0>,<0.3678.0>]
faithful_word | dictionary: []
faithful_word | trap_exit: true
faithful_word | status: running
faithful_word | heap_size: 610
faithful_word | stack_size: 28
faithful_word | reductions: 166
faithful_word | neighbours:
faithful_word |
faithful_word | =INFO REPORT==== 22-Jun-2021::01:13:13.501840 ===
faithful_word | application: kernel
faithful_word | exited: {{shutdown,
faithful_word | {failed_to_start_child,kernel_safe_sup,
faithful_word | {on_load_function_failed,'Elixir.Bcrypt.Base'}}},
faithful_word | {kernel,start,[normal,[]]}}
faithful_word | type: permanent
faithful_word |
faithful_word | {"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Bcrypt.Base'}}},{kernel,start,[normal,[]]}}}"}
faithful_word | Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Bcrypt.Base'}}},{kernel,start,[norm
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment