Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
POD
Merge requests
!77
Avoid outdated libsqlcipher in docker build
Code
Review changes
Check out branch
Download
Email patches
Plain diff
Merged
Vasili Novikov
requested to merge
docker-avoid-outdated-sqlcipher
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
0
0
Compare
master
master (base)
and
latest version
latest version
e84b825a
1 commit,
4 years ago
2 files
+
12
-
9
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
Search (e.g. *.vue) (Ctrl+P)
Docke
rfile
+11
-7
READ
ME.md
+1
-2
Dockerfile
+
11
-
7
Options
View file @ e84b825a
Edit in single-file editor
Open in Web IDE
Show full file
# The image base should be the same as in .gitlab-ci.yml
# Second stage of the Dockerfile (below) should use the same base (rust:slim or it's parent)
###
# The image base should be the same as in .gitlab-ci.yml
###
# Second stage of the Dockerfile (below) should use the same base (rust:slim or it's parent)
FROM
rust:slim
as
cargo-build
ENV
PATH="/root/.cargo/bin:${PATH}"
ENV
DEBIAN_FRONTEND=noninteractive
WORKDIR
/usr/src/pod
RUN
apt-get update
&&
apt-get
install
-y
libsqlcipher-dev git
WORKDIR
/usr/src/pod
#### Compile dependencies and cache them in a docker layer
# Compile dependencies and cache them in a docker layer
COPY
Cargo.toml Cargo.toml
COPY
Cargo.lock Cargo.lock
RUN
set
-x
&&
\
@@ -19,7 +18,10 @@ RUN set -x && \
rm
src/main.rs
&&
\
find target/release/
-type
f
-executable
-maxdepth
1
-delete
# After the dependencies are built, copy the sources and build the real thing.
#### After the dependencies are built, copy the sources and build the real thing.
RUN
apt-get update
&&
apt-get
install
-y
libsqlcipher-dev git
COPY
res res
COPY
build.rs build.rs
COPY
src src
@@ -27,8 +29,10 @@ COPY .git .git
RUN
cargo build
--release
&&
mv
target/release/pod ./
&&
rm
-rf
target
#### After Pod has been built, create a small docker image with just the Pod
FROM
debian:buster-slim
RUN
apt-get update
&&
apt-get
install
-y
libsqlcipher-dev docker.io
COPY
--from=cargo-build /usr/src/pod/pod pod
RUN
apt-get update
&&
apt-get
install
-y
libsqlcipher-dev docker.io
EXPOSE
3030
CMD
["./pod"]
README.md
+
1
-
2
Options
View file @ e84b825a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -16,8 +16,7 @@ will allow Pod to start even with a public IP (with the security implications ab
## Run in docker
To run Pod inside docker:
```
sh
docker-compose build
docker-compose up
docker-compose up
--build
```
Menu
Explore
Projects
Groups
Snippets