diff --git a/dev/dev_setup.sh b/dev/dev_setup.sh index fbf23dc8f..db072cc2a 100755 --- a/dev/dev_setup.sh +++ b/dev/dev_setup.sh @@ -287,11 +287,11 @@ put_brew_packages_in_path() { set_ubuntu_language_encoding() { case $CRYPTOL_PLATFORM in $UBUNTU20 | $UBUNTU22) - if $LANG!= *"UTF-8"* || $LANG != *"utf-8"*; then + if $LANG != *"UTF-8"* || $LANG != *"utf-8"*; then notice "Language environment variables are not set as expected." notice " You may need to set them to UTF-8." notice " Uncomment the LANG var in $VAR_FILE before sourcing to do so" - echo "# uncomment the following lines to fix decoding errors e.g. hGetContents" >> $VAR_FILE + echo "# uncomment the following line to fix decoding errors e.g. hGetContents" >> $VAR_FILE echo "# export LANG=C.UTF-8" >> $VAR_FILE fi;; *) return;; diff --git a/dev/ubuntu20.04.Dockerfile b/dev/ubuntu20.04.Dockerfile index 17d391a69..b1345eda6 100644 --- a/dev/ubuntu20.04.Dockerfile +++ b/dev/ubuntu20.04.Dockerfile @@ -7,8 +7,6 @@ FROM ubuntu:20.04 WORKDIR /home/ -ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" - RUN apt-get -y upgrade \ && apt-get -y update \ && apt-get install -y \ @@ -18,5 +16,8 @@ RUN ["git", "clone", "https://github.com/GaloisInc/cryptol.git"] WORKDIR /home/cryptol RUN ["dev/dev_setup.sh"] -RUN ["source", "dev/env.sh"] -CMD ["/bin/sh"] \ No newline at end of file + +# Hardcode the environment variables we're going to need +ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH=$PATH:/root/.ghcup/bin + +CMD ["/bin/bash"] diff --git a/dev/ubuntu22.04.Dockerfile b/dev/ubuntu22.04.Dockerfile index cdf5ede45..f62bbdc86 100644 --- a/dev/ubuntu22.04.Dockerfile +++ b/dev/ubuntu22.04.Dockerfile @@ -7,8 +7,6 @@ FROM ubuntu:22.04 WORKDIR /home/ -ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" - RUN apt-get -y upgrade \ && apt-get -y update \ && apt-get install -y \ @@ -18,5 +16,8 @@ RUN ["git", "clone", "https://github.com/GaloisInc/cryptol.git"] WORKDIR /home/cryptol RUN ["dev/dev_setup.sh"] -RUN ["source", "dev/env.sh"] -CMD ["/bin/sh"] \ No newline at end of file + +# Hardcode the environment variables we're going to need +ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" PATH=$PATH:/root/.ghcup/bin + +CMD ["/bin/bash"]