Skip to content

Commit ae86337

Browse files
committedMar 2, 2024
Use multi-arch build and workaround issue with alpine3.19
1 parent 3b01817 commit ae86337

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed
 

‎mssql-server-linux-adapter-ci/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
ARG TARGET_VERSION
22

3-
FROM ruby:${TARGET_VERSION}-alpine
3+
# Use `alpine3.18` as there is an issue with SQLite and Ruby v3.3.0 on `alpine3.19`. Revert back to `alpine` when the issue is resolved.
4+
FROM ruby:${TARGET_VERSION}-alpine3.18
45

5-
LABEL maintainer="Wanderson Policarpo <wpolicarpo@gmail.com>"
6+
LABEL maintainer="Aidan Haran <aidanharan@yahoo.com>"
67

78
RUN apk add git make build-base linux-headers sqlite-dev tzdata freetds freetds-dev libpq postgresql-dev
89

‎mssql-server-linux-adapter-ci/README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,22 @@ All commands assume that the `$PWD` is this directory.
1515

1616
Fully automated build. The docker image is pushed as part of the build process. So you need to login to Github packages first:
1717

18-
`docker login ghcr.io`
18+
```shell
19+
docker login ghcr.io
20+
```
21+
22+
Then run the build and push script.
1923

2024
```shell
21-
./build.sh 2.7.1
25+
./build.sh 3.3.0
2226
```
2327

2428
### Build Testing
2529

2630
Simple build command.
2731

2832
```shell
29-
docker build -t railssqlserver/activerecord-sqlserver-adapter:2.7.1 .
33+
docker build --build-arg TARGET_VERSION=3.3.0 -t rails-sqlserver/activerecord-sqlserver-adapter:3.3.0 .
3034
```
3135

3236
Ensure that the build script worked.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
TARGET_VERSION=${1:-'3.2.1'}
4+
TARGET_VERSION=${1:-'3.3.0'}
55

66
images=$(docker images --all --quiet)
77
if [[ -n $images ]]; then
88
docker rmi --force $images
99
fi
1010

11-
docker build --no-cache --build-arg TARGET_VERSION=${TARGET_VERSION} --tag ghcr.io/rails-sqlserver/activerecord-sqlserver-adapter:${TARGET_VERSION} .
11+
docker buildx build --platform linux/amd64,linux/arm64 --no-cache --build-arg TARGET_VERSION=${TARGET_VERSION} --tag ghcr.io/rails-sqlserver/activerecord-sqlserver-adapter:${TARGET_VERSION} .
1212
docker push ghcr.io/rails-sqlserver/activerecord-sqlserver-adapter:${TARGET_VERSION}

0 commit comments

Comments
 (0)
Please sign in to comment.