Skip to content

Commit

Permalink
Use golang 1.12 docker official image for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Dec 27, 2019
1 parent aa46cc4 commit 209191a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions dockerbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM circleci/golang:1.12
FROM golang:1.12

LABEL MAINTAINER="Ivan Izaguirre <[email protected]>"

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"]
16 changes: 8 additions & 8 deletions dockerbuild/buildindocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 209191a

Please sign in to comment.