-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My distro RUST setup is not running it out of the box so I used a more recent one. For the record here is is the observed error: error[E0599]: no variant or associated item named `OutOfMemory` found for enum `ErrorKind` in the current scope -> /root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/sqlx-core-0.5.10/src/sqlite/connection/establish.rs:107:32 Relate-to: #20 Signed-off-by: Philippe Coval <philippe.coval@astrolabe.coop>
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#.dockerignore | ||
.git/ | ||
#.gitignore | ||
/target | ||
Cargo.lock |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/echo docker build . -f | ||
# -*- coding: utf-8 -*- | ||
# SPDX-License-Identifier: MPL-2.0 | ||
#{ | ||
# Copyright: 2021+ Philippe Coval <https://purl.org/rzr/> | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/ . | ||
#} | ||
|
||
FROM ubuntu:22.04 | ||
LABEL maintainer="Philippe Coval (philippe.coval@astrolabe.coop)" | ||
|
||
RUN echo "#log: Setup system" \ | ||
&& set -x \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
--no-install-recommends \ | ||
&& echo "info: rust it not in main?" \ | ||
&& sed -e 's|deb \(.*\) main$|deb \1 main contrib|g' -i /etc/apt/*.list \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
libssl-dev \ | ||
pkg-config \ | ||
cargo \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& date -u | ||
|
||
ARG project=astarte-device-sdk-rust | ||
ARG workdir="/local/src/${project}" | ||
|
||
COPY . "${workdir}/" | ||
WORKDIR "${workdir}" | ||
RUN echo "#log: ${project}: Building sources" \ | ||
&& set -x \ | ||
&& export OPENSSL_NO_VENDOR=1 \ | ||
&& cargo build \ | ||
&& cargo install --path . \ | ||
|| cargo install --examples --path . \ | ||
&& date -u | ||
|
||
WORKDIR "${workdir}" | ||
ENTRYPOINT [ "/usr/bin/cargo" ] | ||
CMD [ "run", "--example", "simple", "--help" ] |