Updated Dockerfile base image and fixed runtime permissions
This commit is contained in:
parent
66bcee129b
commit
65f3525ffd
16
Dockerfile
16
Dockerfile
@ -1,11 +1,21 @@
|
||||
FROM haskell:9.2.8-slim-buster
|
||||
FROM haskell:9.4.8-slim-buster
|
||||
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
RUN groupadd -g ${GID} saundersp \
|
||||
&& useradd -l -m -u "${UID}" -g "${GID}" saundersp
|
||||
|
||||
USER saundersp
|
||||
|
||||
WORKDIR /home/saundersp/haskell_playground
|
||||
|
||||
RUN cabal update
|
||||
|
||||
COPY . .
|
||||
COPY app app
|
||||
COPY haskell-playground.cabal .
|
||||
|
||||
RUN cabal build
|
||||
|
||||
ENTRYPOINT ["cabal", "run"]
|
||||
ENTRYPOINT ["cabal"]
|
||||
CMD ["run"]
|
||||
|
@ -2,6 +2,10 @@ services:
|
||||
haskell-playground:
|
||||
image: saundersp/haskell-playground
|
||||
pull_policy: never
|
||||
build: .
|
||||
build:
|
||||
args:
|
||||
UID: ${UID:-1000}
|
||||
GID: ${GID:-1000}
|
||||
user: ${UID:-1000}:${GID:-1000}
|
||||
volumes:
|
||||
- ./:/home/saundersp/haskell_playground
|
||||
|
@ -8,7 +8,7 @@ executable haskell-playground
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
primes,
|
||||
base ^>=4.16.4.0
|
||||
base ^>=4.17.2.1
|
||||
other-modules:
|
||||
Primes
|
||||
Problems
|
||||
|
Loading…
x
Reference in New Issue
Block a user