Skip to content

Instantly share code, notes, and snippets.

@Vac1911
Last active March 15, 2021 21:01
Show Gist options
  • Save Vac1911/79fe43f096e931e43754ea0760bbe516 to your computer and use it in GitHub Desktop.
Save Vac1911/79fe43f096e931e43754ea0760bbe516 to your computer and use it in GitHub Desktop.
Using this as a hack to execute a script in container instances
#!/bin/bash
# Make sure we're not confused by old, incompletely-shutdown httpd
# context after restarting the container. httpd won't start correctly
# if it thinks it is already running.
rm -rf /run/httpd/* /tmp/httpd*
curl https://gist.githubusercontent.com/Vac1911/227c70665e273bb41347ff6b2945f5ba/raw > /etc/httpd/conf/httpd.conf
exec /usr/sbin/apachectl -DFOREGROUND
@Vac1911
Copy link
Author

Vac1911 commented Mar 3, 2021

Dockerfile:

# Simple startup script to avoid some issues observed with container restart
RUN curl https://gist.githubusercontent.com/Vac1911/79fe43f096e931e43754ea0760bbe516/raw/0f023f0c28ecfe5d77204cf66a2327c81fd581db/run-httpd.sh >> /run-httpd.sh
RUN chmod -v +x /run-httpd.sh

CMD ["/run-httpd.sh"]

@christiante1101
Copy link

can u hack my account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment