Created
June 19, 2017 15:39
-
-
Save cgrs/75a522bbd9f5546a19b5438d0ef3bc17 to your computer and use it in GitHub Desktop.
MariaDB on Alpine Linux (armhf)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:armhf | |
RUN apk update && apk add --no-cache mariadb mariadb-client | |
ADD setup.sh /setup.sh | |
RUN chmod a+x /setup.sh && ./setup.sh && rm -f /setup.sh | |
ENTRYPOINT ["mysqld_safe"] | |
EXPOSE 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mysql_install_db --user=mysql | |
temp=`mktemp` | |
cat <<EOF > $temp | |
USE mysql; | |
FLUSH PRIVILEGES; | |
CREATE USER 'root'@'%'; | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; | |
EOF | |
mysqld --user=mysql --bootstrap < $temp | |
rm -f $temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment