-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
38 lines (30 loc) · 1.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# antoinemopa/shadergif-podman
#
# VERSION 0.1
FROM ruby
RUN apt-get update
RUN apt-get install -y mariadb-client mariadb-server-10.5 libmariadb-dev ffmpeg imagemagick
RUN sh -c "service mariadb start;\
echo \"CREATE USER 'shadergif_development'@'localhost' IDENTIFIED BY 'shadergif_dev_password';\" | mariadb;\
echo \"GRANT ALL PRIVILEGES ON shadergif_development.* TO 'shadergif_development'@'localhost';\" | mariadb;\
echo \"GRANT ALL PRIVILEGES ON shadergif_test.* TO 'shadergif_development'@'localhost';\" | mariadb"
# Install node
RUN apt-get install -y nodejs
COPY . /shadergif
RUN sh -c 'cd shadergif; bundle update; bundle install;'
RUN sh -c 'cd shadergif; \
service mariadb start;\
rails db:create;\
rails db:migrate;\
rails db:seed;'
ENTRYPOINT sh -c 'cd shadergif; bash entrypoint.sh'
# To initialize podman:
# podman machine init -v $HOME:$HOME
# podman machine start # stop to save battery with podman machine stop
#
# To build this container:
# podman build . -t shadergif-podman
#
# To run:
# podman run -v $(pwd):/shadergif -p 3000:3000/tcp -it shadergif-podman
#