Spaces:
Sleeping
Sleeping
Commit
·
c96a313
1
Parent(s):
6bb32f9
Update Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Create the appuser
|
| 2 |
RUN adduser --disabled-password --gecos '' appuser
|
| 3 |
|
|
@@ -7,6 +19,12 @@ RUN chown -R appuser:appuser /app && chmod -R 755 /app
|
|
| 7 |
# Switch to the user for improved security
|
| 8 |
USER appuser
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Define the entrypoint script to handle user creation and application startup
|
| 11 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 12 |
|
|
|
|
| 1 |
+
# Use a suitable base Docker image with necessary dependencies
|
| 2 |
+
FROM circulartextapp/spaceread
|
| 3 |
+
|
| 4 |
+
# Set the working directory to /app
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the current directory contents into the container at /app
|
| 8 |
+
COPY . /app
|
| 9 |
+
|
| 10 |
+
# Install gosu (adjust the package manager based on your base image)
|
| 11 |
+
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
# Create the appuser
|
| 14 |
RUN adduser --disabled-password --gecos '' appuser
|
| 15 |
|
|
|
|
| 19 |
# Switch to the user for improved security
|
| 20 |
USER appuser
|
| 21 |
|
| 22 |
+
# Copy the entrypoint script into the container
|
| 23 |
+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
| 24 |
+
|
| 25 |
+
# Make the entrypoint script executable
|
| 26 |
+
RUN chmod +x /usr/local/bin/entrypoint.sh
|
| 27 |
+
|
| 28 |
# Define the entrypoint script to handle user creation and application startup
|
| 29 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 30 |
|