Skip to content

Commit

Permalink
v1.6.1
Browse files Browse the repository at this point in the history
- alpine 3.17.4
  • Loading branch information
joseluisq committed Jul 23, 2023
1 parent 82ef615 commit e31d688
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM alpine:3.17.3 as build
FROM --platform=$BUILDPLATFORM alpine:3.17.4 as build

ARG TARGETPLATFORM
ARG VERSION=0.0.0
Expand All @@ -22,7 +22,7 @@ RUN set -ex; \
chmod +x /usr/local/bin/enve; \
true

FROM alpine:3.17.3
FROM alpine:3.17.4

ARG VERSION=0.0.0
ENV VERSION=${VERSION}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020-present Jose Quintana <https://git.io/joseluisq>
Copyright (c) 2020-present Jose Quintana <joseluisq.net>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ docker run -it --rm joseluisq/alpine-mysql-client mysql --version

- Default user (unprivileged) is `mysql`.
- `mysql` home directory is located at `/home/mysql`.
- If you want a full privileged user try `root`. E.g append a `--user root` argument to `docker run`.
- If you want a fully privileged user try `root`. E.g append a `--user root` argument to `docker run`.

## Additional Tools

This image comes with some additional tools.

### Exporter

`mysql_exporter` is a custom tool which exports a database script using `mysqldump`. Additionally it support gzip compression.
`mysql_exporter` is a custom tool that exports a database script using `mysqldump`. Additionally it supports gzip compression.
It can be configured via environment variables or using `.env` file.

#### Setup via environment variables
Expand Down Expand Up @@ -81,15 +81,15 @@ DB_ARGS=

**Notes:**

- `DB_EXPORT_GZIP=true`: Compress the sql file using Gzip (optional). If `false` or not defined then the exported file will be a `.sql` file.
- `DB_ARGS`: can be used in order to pass more `mysqldump` arguments (optional).
- An `.env` example file can be found at [./mysql_exporter.env](./mysql_exporter.env)
- `DB_EXPORT_GZIP=true`: Compress the SQL file using Gzip (optional). If `false` or not defined then the exported file will be a `.sql` file.
- `DB_ARGS`: can be used to pass more `mysqldump` arguments (optional).
- A `.env` example file can be found at [./mysql_exporter.env](./mysql_exporter.env)

#### Export a database using a Docker container

The following Docker commands create a container in order to export a database and then remove such container automatically.
The following Docker commands create a container to export a database and then remove such container automatically.

**Note:** `mysql_exporter` supports enviroment variables or a `.env` file passed as argument.
**Note:** `mysql_exporter` supports environment variables or a `.env` file passed as an argument.

```sh
docker run --rm -it \
Expand All @@ -112,9 +112,9 @@ __Notes:__

- `--volume $PWD:/home/mysql/sample` specificy a [bind mount directory](https://docs.docker.com/storage/bind-mounts/) from host to container.
- `$PWD` is just my host working directory. Use your own path.
- `/home/mysql/` is default home directory user (optional). View [User privileges](#user-privileges) section above.
- `/home/mysql/` is the default home directory user (optional). View [User privileges](#user-privileges) section above.
- `/home/mysql/sample` is a container directory that Docker will create for us.
- `--workdir /home/mysql/sample` specificy the working directory used by default inside the container.
- `--workdir /home/mysql/sample` specificies the working directory used by default inside the container.
- `production.env` is a custom env file path with the corresponding environment variables passed as argument. That file shoud available in your host working directory. E.g `$PWD` in my case.

#### Export a database using a Docker Compose file
Expand Down Expand Up @@ -166,9 +166,9 @@ DB_ARGS=

#### Import a SQL script via a Docker container

The following Docker commands create a container in order to import a SQL script file to an specific database and removing the container afterwards.
The following Docker commands create a container to import a SQL script file to a specific database and remove the container afterward.

**Note:** `mysql_importer` supports enviroment variables or a `.env` file passed as argument.
**Note:** `mysql_importer` supports environment variables or a `.env` file passed as an argument.

```sh
docker run --rm -it \
Expand All @@ -188,10 +188,10 @@ docker run --rm -it \

## Contributions

Feel free to send a [pull request](https://github.com/joseluisq/alpine-mysql-client/pulls) or file some [issue](https://github.com/joseluisq/alpine-mysql-client/issues).
Feel free to send a [pull request](https://github.com/joseluisq/alpine-mysql-client/pulls) or file some [issues](https://github.com/joseluisq/alpine-mysql-client/issues).

## License

MIT license

© 2020-present [Jose Quintana](https://git.io/joseluisq)
© 2020-present [Jose Quintana](https://joseluisq.net)

0 comments on commit e31d688

Please sign in to comment.