Skip to content

Commit

Permalink
Merge pull request #45 from starsep/docker
Browse files Browse the repository at this point in the history
COPY files as late as possible in Dockerfile
  • Loading branch information
lazamar authored Aug 29, 2024
2 parents 727859d + b86eb35 commit c6b8da7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ Dockerfile
.git
.gitignore
build-linux.sh
.idea
.secrets
database
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM haskell:9.2.5

RUN apt-get update && apt-get install -y curl bzip2 adduser tmux vim sqlite3

# Copy project to container
COPY . /home/app
WORKDIR /home/app

# Install Nix
Expand All @@ -16,5 +14,7 @@ ENV USER=root
RUN echo ". $HOME/.nix-profile/etc/profile.d/nix.sh" >> $HOME/.bashrc

# Build project
RUN cabal update
COPY cabal.project.freeze cabal.project.local nix-package-versions.cabal /home/app/
RUN cabal update && cabal v2-build --only-dependencies
COPY . /home/app
RUN cabal v2-build -j

0 comments on commit c6b8da7

Please sign in to comment.