Use golang 1.12 docker official image for builds

This commit is contained in:
Ivan Izaguirre 2019-12-27 15:31:34 +01:00
parent aa46cc48e5
commit 209191af72
2 changed files with 14 additions and 14 deletions

View File

@ -1,15 +1,15 @@
FROM circleci/golang:1.12
FROM golang:1.12
LABEL MAINTAINER="Ivan Izaguirre <ivanizag@gmail.com>"
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"]

View File

@ -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