Skip to content

Commit d6c37fe

Browse files
committed
fix dockerfile
1 parent e6dd4f4 commit d6c37fe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Using hexpm/elixir:1.11.4-erlang-23.2.7.2-alpine-3.13.3 as the base image
2-
FROM hexpm/elixir:1.11.4-erlang-23.2.7.2-alpine-3.13.3 AS base
1+
# Using elixir:1.18.3-otp-27-slim as the base image
2+
FROM elixir:1.18.3-otp-27-slim AS base
33

44
# Set the working directory in the container
55
WORKDIR /code_comparison
@@ -8,7 +8,10 @@ WORKDIR /code_comparison
88
# npm is needed for asset building.
99
# inotify-tools is often for development (auto-reload), might not be strictly needed for a prod build,
1010
# but keeping it as per original Dockerfile's intent for now.
11-
RUN apk add --no-cache npm inotify-tools
11+
RUN apt-get update && \
12+
apt-get install -y npm inotify-tools && \
13+
apt-get clean && \
14+
rm -rf /var/lib/apt/lists/*
1215

1316
# Set environment variables for production
1417
ENV MIX_ENV=prod
@@ -18,10 +21,6 @@ ENV PORT=4000
1821
# This includes the 'topics/' directory, mix files, config, lib, assets, etc.
1922
COPY . .
2023

21-
# Provide a dummy SECRET_KEY_BASE for compilation, must be at least 64 bytes long for prod.
22-
# This will be overridden by the runtime environment variable on Render.
23-
ENV SECRET_KEY_BASE="dummy_build_time_secret_key_base_must_be_at_least_64_bytes_long_for_prod_build_0123456789"
24-
2524
# Install Elixir dependencies
2625
# --force is used to ensure local hex and rebar are up-to-date
2726
RUN mix local.hex --force && \

0 commit comments

Comments
 (0)