Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +20 -9
Dockerfile
CHANGED
|
@@ -4,12 +4,24 @@ FROM oven/bun:1.0
|
|
| 4 |
# Switch to root user to install packages
|
| 5 |
USER root
|
| 6 |
|
| 7 |
-
# Install
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Create a non-root user for the application itself
|
| 15 |
RUN useradd -m -u 2000 user
|
|
@@ -30,8 +42,7 @@ COPY --chown=user . /app
|
|
| 30 |
RUN chmod +x start.sh
|
| 31 |
|
| 32 |
# Expose the port your application will run on
|
| 33 |
-
EXPOSE
|
| 34 |
|
| 35 |
-
# Set the command to our startup script
|
| 36 |
-
# This script will launch the database and cache before starting the app.
|
| 37 |
CMD ["./start.sh"]
|
|
|
|
| 4 |
# Switch to root user to install packages
|
| 5 |
USER root
|
| 6 |
|
| 7 |
+
# Step 1: Install prerequisites for adding a new repository
|
| 8 |
+
RUN apt-get update && apt-get install -y curl gpg apt-transport-https
|
| 9 |
+
|
| 10 |
+
# Step 2: Add the official Valkey repository GPG key and source list
|
| 11 |
+
RUN curl -fsSL https://packages.valkey.io/gpg/valkey-io-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/valkey-io-archive-keyring.gpg
|
| 12 |
+
RUN echo "deb [signed-by=/usr/share/keyrings/valkey-io-archive-keyring.gpg] https://packages.valkey.io/deb bullseye main" | tee /etc/apt/sources.list.d/valkey-io.list
|
| 13 |
+
|
| 14 |
+
# Step 3: Now update again and install everything
|
| 15 |
+
# The package manager now knows where to find Valkey
|
| 16 |
+
RUN apt-get update && apt-get install -y \
|
| 17 |
+
postgresql \
|
| 18 |
+
postgresql-client \
|
| 19 |
+
valkey-server \
|
| 20 |
+
valkey-tools \
|
| 21 |
+
procps \
|
| 22 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
+
|
| 24 |
+
# --- The rest of the file is the same as before ---
|
| 25 |
|
| 26 |
# Create a non-root user for the application itself
|
| 27 |
RUN useradd -m -u 2000 user
|
|
|
|
| 42 |
RUN chmod +x start.sh
|
| 43 |
|
| 44 |
# Expose the port your application will run on
|
| 45 |
+
EXPOSE 8000
|
| 46 |
|
| 47 |
+
# Set the command to our startup script
|
|
|
|
| 48 |
CMD ["./start.sh"]
|