Skip to content

Commit

Permalink
Docker file installs golang
Browse files Browse the repository at this point in the history
  • Loading branch information
edotau committed Jan 24, 2022
1 parent 8abeefc commit 0779ed3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -eou pipefail

release_list=https://golang.org/dl/
SOURCE=https://storage.googleapis.com/golang

Expand Down Expand Up @@ -72,26 +70,3 @@ URL=$SOURCE/$FILENAME
wget $URL
tar xf $FILENAME -C $DIR; rm $FILENAME

GITHUB=~/src/github.com

if ! [ -e "$GITHUB" ] ; then
echo "mkdir -p $GITHUB"
mkdir -p $GITHUB
fi

# Create GOBIN DIR for executables if it doesn't already exist
if ! [ -e "$GOBIN" ] ; then
echo "mkdir -p $GOBIN"
mkdir -p $GOBIN
fi

# Set directories to install goFish
goFishDir=${GITHUB}/edotau
mkdir -p ${goFishDir}
mv ${GITHUB}/goFish/ ${goFishDir}/

cd $goFishDir
# Contingent on passing all go tests, we finally install/build all goFish binary programs
go mod init; go mod tidy
go test ./...
go install ./...
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ ENV PATH=$PATH:/root/miniconda3/bin/
# install "report" environment's dependencies
RUN conda update -n base -c defaults conda

WORKDIR /home
RUN git clone https://github.com/edotau/goFish.git
COPY . /home/edotau/goFish

RUN bash goFish/.github/workflows/install.sh
RUN bash /home/edotau/goFish/.github/workflows/install.sh
ENV PATH=$PATH:/usr/local/go/bin

WORKDIR /home/edotau/goFish
RUN go test ./...

0 comments on commit 0779ed3

Please sign in to comment.