...
This commit is contained in:
30
dockerbuilder/Dockerfile
Normal file
30
dockerbuilder/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Use Ubuntu 24.04 as the base image
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# Set environment variables
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LANG=C.UTF-8 \
|
||||
PATH="/root/.bun/bin:$PATH"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates curl build-essential redis unzip \
|
||||
&& curl -fsSL https://bun.sh/install | bash \
|
||||
&& bun -v \
|
||||
&& redis-server --daemonize yes \
|
||||
&& curl -fsSL https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer.sh > /tmp/install.sh \
|
||||
&& bash /tmp/install.sh \
|
||||
&& rm -f /tmp/install.sh \
|
||||
&& redis-cli shutdown \
|
||||
&& apt-get clean \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm -rf /var/cache/apt/archives/* \
|
||||
&& rm -rf /var/log/* \
|
||||
&& rm -rf /var/tmp/* \
|
||||
&& rm -rf /tmp/* \
|
||||
&& rm -rf /root/.cache/* || true
|
||||
|
||||
# Expose application port
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["redis-server"]
|
20
dockerbuilder/build_arm.sh
Executable file
20
dockerbuilder/build_arm.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if --no-cache argument is provided
|
||||
NO_CACHE=""
|
||||
if [ "$1" == "--no-cache" ]; then
|
||||
NO_CACHE="--no-cache"
|
||||
fi
|
||||
|
||||
# Build with:
|
||||
# 1. Build arguments for better cache control
|
||||
# 2. Compression and squashing for smaller image size
|
||||
# 3. Platform specification for better compatibility
|
||||
docker build \
|
||||
$NO_CACHE \
|
||||
--compress \
|
||||
--force-rm \
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||
--platform linux/arm64 \
|
||||
-t despiegk/devel:latest \
|
||||
.
|
1
dockerbuilder/push.sh
Normal file
1
dockerbuilder/push.sh
Normal file
@@ -0,0 +1 @@
|
||||
docker push despiegk/devel:latest
|
2
dockerbuilder/shell.sh
Executable file
2
dockerbuilder/shell.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker run -it --rm despiegk/devel:latest /bin/bash
|
Reference in New Issue
Block a user