Skip to content

Commit 631d003

Browse files
authored
Merge pull request #2 from Liquid-dev/pre_install_mysql
Preinstall mysql
2 parents eafbfb1 + 5e372b4 commit 631d003

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# https://github.com/lambci/docker-lambda#documentation
22
FROM lambci/lambda:build-provided.al2
33

4-
ARG RUST_VERSION=1.56.1
5-
RUN yum install -y jq openssl-devel
4+
ARG RUST_VERSION=1.57.0
5+
RUN yum install -y jq openssl-devel mysql-devel
66
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
77
| CARGO_HOME=/cargo RUSTUP_HOME=/rustup sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION
88
ADD build.sh /usr/local/bin/

build.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ export CARGO_TARGET_DIR=$PWD/target/lambda
2828
yum install -y "$@"
2929
fi
3030

31-
if test -f "$HOOKS_DIR/$INSTALL_HOOK"; then
32-
echo "Running install hook"
33-
/bin/bash "$HOOKS_DIR/$INSTALL_HOOK"
34-
echo "Install hook ran successfully"
35-
fi
36-
3731
# source cargo
3832
. $CARGO_HOME/env
3933

@@ -69,12 +63,7 @@ function package() {
6963
cp "${file}.debug" "${OUTPUT_FOLDER}/bootstrap.debug" > 2&>/dev/null || true
7064

7165
if [[ "$PACKAGE" != "false" ]]; then
72-
zip -j "$file.zip" "${OUTPUT_FOLDER}/bootstrap"
73-
if test -f "$HOOKS_DIR/$PACKAGE_HOOK"; then
74-
echo "Running package hook"
75-
/bin/bash "$HOOKS_DIR/$PACKAGE_HOOK" $file
76-
echo "Package hook ran successfully"
77-
fi
66+
zip -j "$file.zip" "${OUTPUT_FOLDER}/bootstrap" /usr/lib64/mysql/libmysqlclient.so.18
7867
fi
7968
}
8069

0 commit comments

Comments
 (0)