-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dj/multi architecture docker image (#498)
* fix: support multi-architecture docker image * fix: remove sqlite client * fix: trailing spaces reported by ameba * fix:remove special command
- Loading branch information
Showing
3 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
FROM crystallang/crystal:1.8.0 | ||
|
||
ARG sqlite_version=3110000 | ||
ARG sqlite_version_year=2016 | ||
FROM 84codes/crystal:latest-ubuntu-jammy | ||
|
||
# Install deps | ||
RUN apt-get update -qq && apt-get install -y --no-install-recommends libpq-dev libmysqlclient-dev libsqlite3-dev wget unzip lib32z1 | ||
RUN apt-get update -qq && apt-get install -y --no-install-recommends libpq-dev libmysqlclient-dev libsqlite3-dev | ||
|
||
WORKDIR /app/user | ||
|
||
COPY shard.yml ./ | ||
COPY shard.yml /app/user | ||
COPY shard.lock /app/user | ||
RUN shards install | ||
|
||
COPY . /app/user | ||
COPY src /app/user/src | ||
COPY spec /app/user/spec | ||
|
||
RUN wget -O sqlite.zip https://www.sqlite.org/$sqlite_version_year/sqlite-tools-linux-x86-$sqlite_version.zip && unzip -d /usr/bin/ -j sqlite.zip && rm sqlite.zip | ||
ENTRYPOINT [] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
version: '2' | ||
services: | ||
spec: | ||
command: 'bash -c "cd /app/user && bin/ameba && crystal tool format --check && sqlite3 --version && crystal spec"' | ||
extends: | ||
file: ../docker-compose.yml | ||
service: spec | ||
build: | ||
context: ../ | ||
args: | ||
sqlite_version: ${SQLITE_VERSION} | ||
sqlite_version_year: ${SQLITE_VERSION_YEAR} | ||
environment: | ||
CURRENT_ADAPTER: sqlite |
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