mirror of
https://github.com/glauth/glauth.git
synced 2026-10-25 13:40:48 +00:00
Continuing to work on docker build
This commit is contained in:
+6
-1
@@ -40,8 +40,13 @@ ADD sample-simple.cfg /app/config/config.cfg
|
||||
# Copy binary from build container
|
||||
COPY --from=build /app/glauth /app/glauth
|
||||
|
||||
# Copy docker specific scripts from build container
|
||||
COPY --from=build /app/docker/start.sh /app/docker/
|
||||
COPY --from=build /app/docker/default-config.cfg /app/docker/
|
||||
|
||||
# Expose web and LDAP ports
|
||||
EXPOSE 389 5555
|
||||
|
||||
# To use your own config, mount /app/config, and place config.cfg in mounted volume
|
||||
CMD ["/app/glauth", "-c", "/app/config/config.cfg"]
|
||||
# CMD ["/app/glauth", "-c", "/app/config/config.cfg"]
|
||||
CMD ["/bin/bash", "/app/docker/start.sh"]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
img="localhost/glauth-dev"
|
||||
|
||||
sudo docker rmi -f $img
|
||||
|
||||
sudo docker build -f Dockerfile -t $img .
|
||||
|
||||
# sudo docker run $img --publish-all
|
||||
sudo docker run $img
|
||||
sudo docker rmi -f $img
|
||||
sudo docker run -P $img
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copy config file if it doesn't exist so that the app can start
|
||||
if [ ! -f /app/config/config.cfg ] ; then
|
||||
cp /app/docker/default-config.cfg /app/config/config.cfg;
|
||||
fi
|
||||
|
||||
# Run app
|
||||
/app/glauth -c /app/config/config.cfg
|
||||
Reference in New Issue
Block a user