A low-background inclusive search for new physics in events with same-sign dileptons is presented. The search uses proton-proton collisions corresponding to 20.3 fb(-1) of integrated luminosity taken in 2012 at a centre-of-mass energy of 8TeV with the ATLAS detector at the LHC. Pairs of isolated leptons with the same electric charge and large transverse momenta of the type e(+/-) e(+/-), e(+/-) mu(+/-), and mu(+/-) mu(+/-) are selected and their invariant mass distribution is examined. No excess of events above the expected level of Standard Model background is found. The results are used to set upper limits on the cross-sections for processes beyond the Standard Model. Limits are placed as a function of the dilepton invariant mass within a fiducial region corresponding to the signal event selection criteria. Exclusion limits are also derived for a specific model of doubly charged Higgs boson production.