Continuing to work on docker build

This commit is contained in:
Ben Yanke
2018-04-22 10:33:31 -05:00
parent 68edcdc228
commit 70ff3600ec
4 changed files with 18 additions and 4 deletions
+6 -1
View File
@@ -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"]
+3 -3
View File
@@ -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
View File
+9
View File
@@ -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