From 209191af72569d8c0de4add8b811af16a396b904 Mon Sep 17 00:00:00 2001 From: Ivan Izaguirre Date: Fri, 27 Dec 2019 15:31:34 +0100 Subject: [PATCH] Use golang 1.12 docker official image for builds --- dockerbuild/Dockerfile | 12 ++++++------ dockerbuild/buildindocker.sh | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dockerbuild/Dockerfile b/dockerbuild/Dockerfile index af8c5ca..eefc489 100644 --- a/dockerbuild/Dockerfile +++ b/dockerbuild/Dockerfile @@ -1,15 +1,15 @@ -FROM circleci/golang:1.12 +FROM golang:1.12 LABEL MAINTAINER="Ivan Izaguirre " -RUN sudo apt-get update -RUN sudo apt-get install -y libsdl2-dev mingw-w64 +RUN apt-get update +RUN apt-get install -y libsdl2-dev mingw-w64 RUN wget https://www.libsdl.org/release/SDL2-devel-2.0.9-mingw.tar.gz -RUN sudo tar -xzf SDL2-devel-2.0.9-mingw.tar.gz -RUN sudo cp -r SDL2-2.0.9/x86_64-w64-mingw32 /usr +RUN tar -xzf SDL2-devel-2.0.9-mingw.tar.gz +RUN cp -r SDL2-2.0.9/x86_64-w64-mingw32 /usr COPY buildindocker.sh . -RUN sudo chmod +x buildindocker.sh +RUN chmod +x buildindocker.sh CMD ["./buildindocker.sh"] diff --git a/dockerbuild/buildindocker.sh b/dockerbuild/buildindocker.sh index b19fbd9..2a1969d 100644 --- a/dockerbuild/buildindocker.sh +++ b/dockerbuild/buildindocker.sh @@ -5,23 +5,23 @@ git clone https://github.com/ivanizag/apple2 # Build apple2console for Linux cd /tmp/apple2/apple2console go build . -sudo chown --reference /build apple2console -sudo cp apple2console /build +chown --reference /build apple2console +cp apple2console /build # Build apple2console.exe for Windows cd /tmp/apple2/apple2console env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib" CGO_FLAGS="-I/usr/x86_64-w64-mingw32/include -D_REENTRANT" go build -o apple2console.exe . -sudo chown --reference /build apple2console.exe -sudo cp apple2console.exe /build +chown --reference /build apple2console.exe +cp apple2console.exe /build # Build apple2sdl for Linux cd /tmp/apple2/apple2sdl go build . -sudo chown --reference /build apple2sdl -sudo cp apple2sdl /build +chown --reference /build apple2sdl +cp apple2sdl /build # Build apple2sdl.exe for Windows cd /tmp/apple2/apple2sdl env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib -lSDL2" CGO_FLAGS="-I/usr/x86_64-w64-mingw32/include -D_REENTRANT" go build -o apple2sdl.exe . -sudo chown --reference /build apple2sdl.exe -sudo cp apple2sdl.exe /build +chown --reference /build apple2sdl.exe +cp apple2sdl.exe /build