forked from wangxian/alpine-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (31 loc) · 1.33 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM alpine:latest
MAINTAINER Daniel Andrei Minca <[email protected]>
# Metadata params
ARG BUILD_DATE
ARG VERSION
ARG VCS_URL
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.version=$VERSION \
org.label-schema.name='MySQL on Alpine Linux' \
org.label-schema.description='MySQL lightweight image running on Alpine Linux' \
org.label-schema.usage='https://github.com/WizDevOps/dockerfiles' \
org.label-schema.url='https://github.com/WizDevOps/dockerfiles' \
org.label-schema.vendor='Daniel Andrei Minca' \
org.label-schema.schema-version='1.0' \
org.label-schema.docker.cmd='docker run --rm -ti --name mysql \
-p 3306:3306 -v $(pwd):/app -e MYSQL_DATABASE=admin -e MYSQL_USER=adminusr \
-e MYSQL_PASSWORD=admin -e MYSQL_ROOT_PASSWORD=111111 wizdevops/alpine-mysql' \
org.label-schema.docker.cmd.devel='docker run --rm -ti wizdevops/alpine-mysql ash' \
org.label-schema.docker.debug='docker logs $CONTAINER' \
io.github.dminca.docker.dockerfile="/Dockerfile" \
io.github.dminca.license="GPLv3"
WORKDIR /app
VOLUME /app
COPY startup.sh /startup.sh
RUN apk add --update mysql mysql-client && rm -f /var/cache/apk/*
COPY my.cnf /etc/mysql/my.cnf
EXPOSE 3306
CMD ["/startup.sh"]