commit fe606f88b13d29b493e86f80f3867029cf21fd14
parent d756ff30216038d0eb7f194cdb3bf24e101540b2
Author: Henry Unite <unitehenry@gmail.com>
Date: Sat, 25 Jul 2026 23:09:49 +0000
chore: guacamole images
Diffstat:
4 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/deploy.template.yaml b/deploy.template.yaml
@@ -6,7 +6,7 @@ services:
github:
repo: unitehenry/amish
branch: master
- dockerfile_path: images/Containerfile.guacamole
+ dockerfile_path: images/guacamole/Containerfile
http_port: 8080
instance_size_slug: basic-xxs
envs:
diff --git a/images/Containerfile.guacamole b/images/Containerfile.guacamole
@@ -5,14 +5,7 @@ USER root
RUN mkdir -p /etc/guacamole && chown guacamole:guacamole /etc/guacamole
COPY --chown=guacamole:guacamole guacamole/config/user-mapping.xml /etc/guacamole/user-mapping.xml
-
-RUN cat > /opt/guacamole/entrypoint.d/150-replace-credentials.sh << 'EOF'
-if [ -n "${USERNAME}" ] && [ -n "${PASSWORD}" ]; then
- PASS_HASH=$(echo -n "${PASSWORD}" | md5sum | awk '{print $1}')
- sed -i "s/__USERNAME__/${USERNAME}/g" /etc/guacamole/user-mapping.xml
- sed -i "s/__PASSWORD__/${PASS_HASH}/g" /etc/guacamole/user-mapping.xml
-fi
-EOF
+COPY --chown=guacamole:guacamole images/guacamole/entrypoint.d/150-replace-credentials.sh /opt/guacamole/entrypoint.d/150-replace-credentials.sh
RUN chmod 644 /opt/guacamole/entrypoint.d/150-replace-credentials.sh /etc/guacamole/user-mapping.xml
diff --git a/images/guacamole/Containerfile b/images/guacamole/Containerfile
@@ -0,0 +1,12 @@
+FROM guacamole/guacamole
+
+USER root
+
+RUN mkdir -p /etc/guacamole && chown guacamole:guacamole /etc/guacamole
+
+COPY --chown=guacamole:guacamole guacamole/config/user-mapping.xml /etc/guacamole/user-mapping.xml
+COPY --chown=guacamole:guacamole guacamole/entrypoint.d/150-replace-credentials.sh /opt/guacamole/entrypoint.d/150-replace-credentials.sh
+
+RUN chmod 644 /opt/guacamole/entrypoint.d/150-replace-credentials.sh /etc/guacamole/user-mapping.xml
+
+USER guacamole
diff --git a/images/guacamole/entrypoint.d/150-replace-credentials.sh b/images/guacamole/entrypoint.d/150-replace-credentials.sh
@@ -0,0 +1,5 @@
+if [ -n "${USERNAME}" ] && [ -n "${PASSWORD}" ]; then
+ PASS_HASH=$(echo -n "${PASSWORD}" | md5sum | awk '{print $1}')
+ sed -i "s/__USERNAME__/${USERNAME}/g" /etc/guacamole/user-mapping.xml
+ sed -i "s/__PASSWORD__/${PASS_HASH}/g" /etc/guacamole/user-mapping.xml
+fi