Commit 4c9151c0 authored by julien dehos's avatar julien dehos

dockerfile ok + first ci

parent 29772604
Pipeline #44831810 failed with stages
in 8 minutes and 45 seconds
build:
image: juliendehos/misomorphic:latest
artifacts:
untracked: true
script:
- nix-build nix/docker.nix
- cp result miso-xhr.tar.gz
only:
- master
production:
type: deploy
image: docker:stable
services:
- docker:dind
script:
- docker load < miso-xhr.tar.gz
#- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.example.com
#- docker build -t registry.example.com/group/project/image:latest .
#- docker push registry.example.com/group/project/image:latest
- docker rmi juliendehos/misomorphic:latest
only:
- master
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
FROM nixos/nix
WORKDIR /root
RUN nix-channel --add https://nixos.org/channels/nixos-18.09 nixpkgs
RUN nix-channel --update
RUN nix-env -iA nixpkgs.git
WORKDIR /root
RUN git clone https://gitlab.com/juliendehos/miso-xhr
WORKDIR /root/miso-xhr
......
FROM lnl7/nix
RUN nix-env -iA nixpkgs.git
WORKDIR /root
RUN git clone https://gitlab.com/juliendehos/miso-xhr
WORKDIR /root/miso-xhr
RUN nix-shell -A server --run "echo server ok"
RUN nix-shell -A client --run "echo client ok"
......@@ -7,7 +7,7 @@ docker push juliendehos/misomorphic:latest
docker logout
```
**Warning: this takes more than 1 hour and requires more than 4 GB RAM !**
**Warning: this takes about 2 hours and requires more than 4 GB RAM !**
You have to build & upload a new image, if you change something in [the nixpkgs.nix file](../nix/nixpkgs.nix).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment